Printing to PDF + VBA. Help!


Joined
May 14, 2012
Messages
21
Reaction score
0
Hi,

Im trying to create a code which wil print the required excel sheets into a pdf file. I have built the code to arrange and select specific sheets to print but when Im trying to print into pdf, though the file is created but it doesnt open .. Im using the following code for it ..

ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:="Adobe PDF on Ne02:", Collate:=True, PrToFileName:=PDFExportPath & "\" & PDFFileName & ".pdf"


As mentioned, its creating the file but when i try to open it it gives an error that - acrobat could not open because it is either not a supported.

Can u think where is it goin wrong to decode this file?

Im have Excel 2003 and Adobe 8.0 on my computer.

Thanks!
 
Ad

Advertisements

Joined
Nov 25, 2012
Messages
10
Reaction score
0
Maybe you should use the SaveAs function to save to PDF. I'm not sure if that exists in excel 2003 but I know it does in 2010. I think you can automate the SaveAs function in VBA.
 
Ad

Advertisements

Joined
Nov 11, 2012
Messages
17
Reaction score
1
Maybe you should use the SaveAs function to save to PDF. I'm not sure if that exists in excel 2003 but I know it does in 2010. I think you can automate the SaveAs function in VBA.
The saveas PDF did not come until Office 2007
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top