These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Not creating the postscript file correctly

sarada
Registered: Jun 20 2007
Posts: 7

Hi,
 
I am trying to convert a few excel sheets to PDF from VBA. These sheets has print size reduced to 75%. I am doing this using VBA. I get the following error in the log
 
%%[ Error: syntaxerror; OffendingCommand: ) ]%%
%%[ Flushing: rest of job (to end-of-file) will be ignored ]%%
%%[ Warning: PostScript error. No PDF file produced. ] %%
 
I changed many things and got it working. But When closed down excel and restarted again, it failed.
  
gSummaryWS.PrintOut copies:=1, preview:=False, collate:=True, _
ActivePrinter:="Acrobat Distiller", _
printtofile:=True, prTofilename:=PSFileName
 
Dim myPDF As PdfDistiller
Set myPDF = New PdfDistiller
myPDF.FileToPDF PSFileName, PDFFileName, ""
 
It creates the ps file. But can't open it. Do I have to do something related to embed font settings. My sheet print % is less than 100%
 
I am using Acrobat 7.0
 
Thanks in advance
Sarada

My Product Information:
Acrobat Standard 7.0.0, Windows
dthanna
ExpertTeam
Registered: Sep 28 2005
Posts: 248
Sarada.

I need a copy of the .PS file in question to aid in what's going wrong. 'OffendingCommand' is equivant to the 'Check Engine' light in many cars.

It may be an issue of how you are calling the Adobe PDF printer, it may be an issue of your Excel spreadsheet.

May I make the bold assumption that when handling this manually it works without a charm?

Thanks.

Douglas Hanna is a member of the Production Print Technology team at Aon.
www.aonhewitt.com

sarada
Registered: Jun 20 2007
Posts: 7
Thanks for looking into this issue Douglas. I sorted out the problem myself. The reason why it was happening was I was not setting the 'ADOBE PDF' as the active printer in the VB code.
Once I added the line Application.activePrinter = "Adobe PDF on NE03:", it started working without any problems

Thanks anyway for trying to help out.
Libby8749
Registered: Aug 17 2011
Posts: 2
did not mean to respond

Libby