The ConvertExcelDocument2 converts an Excel document to PDF. Excel sheet names can be added as bookmarks in the PDF.
HRESULT ConvertExcelDocument2(
[in, string] BSTR p_wsDocName,
[in] BOOL p_bConvertSheetNamesToPDFBookmarks,
[in] BOOL p_bWaitPDF
);
Parameters:
p_wsDocName
[in] Excel document name with full path
p_bConvertSheetNamesToPDFBookmarks
[in] flag, if set to 1 Excel sheet names will be added as PDF bookmarks
p_bWaitPDF
[in] flag, if set function returns after pdf is saved and all actions executed
Return values:
S_OK
on success or COM error codeNV_NOT_INITIALIZED
- Initialize was not calledNV_OPENFILE_ERROR
- failed to open the documentNV_FILEPROCESS_ERROR
- failed to read document informationRemarks:
Hidden links from Excel document are not converted to PDF links.