Excel VBA to print a chart as a pdf file

G

Golf Club

I want to print a chart to a pdf file when the file is
opened. I am using Excel 2000. I tried using a macro to
write the VBA for me, but the recorder does not capture
the "Save PDF File As" information. Any help would be
appreciated.
 
F

Frank Kabel

Hi
you need a 'pdf printer' to be able to print a chart as pdf format.
e.g., Adobe Acrobat
 
J

Jan Riegman

First you need a pdf printer driver.

Then in VBA
' store your active printer
StrActivePrinter = Application.ActivePrinter

' activa your pdf like this
Application.ActivePrinter = "Adobe PDF op Ne05:"

' and setting your printer back
Application.ActivePrinter = StrActivePrinter

For the right name of the PDF printer you can record a macro puch CRTL+P
select by the printer your pdf driver, then cancel

I hope that will help you trough your problem
 

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