Thom McCarthy
asked on
Using pdf995 in macro gets error
I have a macro that selects and prints a chart.
When I do a "Record Macro" and tell it to print using PDF995, I get a good PDF file.
When I use :
ActiveWindow.SelectedSheet s.PrintOut Copies:=1, Collate:=True, PrToFileName:="c:\Zaas\dir 1.pdf", the pdf file is three times bigger and won't open.
The error message says either the file's an incompatable format or it's corrupted.
I'd appreciate any help.
Thanks
When I do a "Record Macro" and tell it to print using PDF995, I get a good PDF file.
When I use :
ActiveWindow.SelectedSheet
The error message says either the file's an incompatable format or it's corrupted.
I'd appreciate any help.
Thanks
Sub Dir1()
'
' Dir1 Macro
' Macro recorded 10/23/2008 by tmccar10
'
ActiveWindow.Visible = False
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.ChartArea.Select
Application.ActivePrinter = "PDF995 on Ne00:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, PrToFileName:="c:\Zaas\dir1.pdf"
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Unfortunately, I need this to distribute this to a lot of people and my company doesn't provide Acrobat to many people.
I can use pdf995 with the same intervention you mentioned. I was trying to avoid that, as you can imagine.
I appreciate the code and I'll keep it, just in case.