I get a "Run-time Error 5 - Invalid procedure call or argument" on the ExportAsFixedFormat to PDF.
The preceding save to .jpg works so I am stumped. I know the PDF export interacts with my printer settings so maybe that's an issue.
The ChartObject height and width are 1000 so could that be a problem if the printer has only a 8 1/2 x 11 tray?
The preceding save to .jpg works so I am stumped. I know the PDF export interacts with my printer settings so maybe that's an issue.
The ChartObject height and width are 1000 so could that be a problem if the printer has only a 8 1/2 x 11 tray?
Code:
With chtObj ' a ChartObject
fName = ActiveWorkbook.Path & "\Org Charts\" & title
.Chart.Export fName & ".jpg"
.Activate
.Chart.ExportAsFixedFormat Type:=xlTypePDF, Filename:=fName & ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=False, IgnorePrintAreas:=False, OpenAfterPublish:=False
End With