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 );
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
S_OKon success or COM error code
NV_NOT_INITIALIZED- Initialize was not called
NV_OPENFILE_ERROR- failed to open the document
NV_FILEPROCESS_ERROR- failed to read document information
Hidden links from Excel document are not converted to PDF links.