;;; XL is the Excel Spreadsheet
;;; XLS is the Excel worksheet
(vlax-put-property XL "ActivePrinter" "DocuCom PDF Driver on Ne03:")
(vlax-invoke-method XLS "Printout")
I'm using the above code to change the printer then print out an excel page.
I would rather use:
(vlax-invoke-method XLS "ExportAsFixedFormat")
This way I would have control of where it gets saved along with not having to deal with the fact that the end user might not have the .pdf driver.
Of course, with the above line I do not have all of the necessary parameters. When I inspect the line it tells me that.
Looking at the object browser in Excel I can find the following information on ExportAsFixedFormat:
Sub ExportAsFixedFormat(Type As XlFixedFormatType, [Filename], [Quality],
[IncludeDocProperties], [IgnorePrintAreas], [From], [To], [OpenAfterPublish],
[FixedFormatExtClassPtr]) Member of Excel.Worksheet
This is where I am having issues. I need the XlFixedFormatType (which I've found out to be xlTypePDF) but can not figure out how to format the line in LISP to accept it. I've tried different variations such as:
(vlax-invoke-method XLS "ExportAsFixedFormat" "xlTypePDF")
(vlax-invoke-method XLS "ExportAsFixedFormat" xlTypePDF)
(vlax-invoke-method XLS "ExportAsFixedFormat" "XlFixedFormatType.xlTypePDF")
Any help or documentation would be greatly appreciated