Hello,
I have a program created in VB6 that creates an Excel spreadsheet and i want to save it as a .pdf instead of a .xls file.
I have tried multiple ways of coding it but nothing seams to work. Below is the way that seems closest to working...
PDF Code:
Dim p As String Dim myPDF As PdfDistiller Dim xBook As String 'Contains name of createad workbook p = "Acrobat Distiller on Ne00:" xApp.Workbooks(xBook).PrintOut ActivePrinter:=p, printtofile:=True, prToFileName:="c:\mypostscript.ps" Set myPDF = New PdfDistiller myPDF.FileToPDF "c:\mypostscript.ps", "G:\MVBS\Final mvbs\" & Format(Info.xYear, "0000") & "\" & Format(rsProp!entity_num) & ".pdf", "" Set myPDF = Nothing
It just creates a .log file with the following errors in it...
I'm not sure what is going wrong or how to accomplish what I'm trying to do. I have read several posts and a lot have similar code, but I can't get it to work. Maybe I am missing a particular reference??Code:%%[ Error: undefined; OffendingCommand: E*t600R&u600D*r0F&l0o&l2A&l7H&l0S&l1X&l8c1E*p0x0Y*c0t5760x7680Y*b0M ]%%
%%[ Flushing: rest of job (to end-of-file) will be ignored ]%%
%%[ Warning: PostScript error. No PDF file produced. ] %%
Any help is appreciated.
Thanks!
