raven_squire
Board Regular
- Joined
- Jan 13, 2013
- Messages
- 99
Hello,
I am working with lots of graphs and the page size is A1 (too many data points to display on A4 with the lowest marker size of 2).
I can save one graph manually as PDF and everything displays fine on the PDF.
If I save one with vba using recorded code the graph on the pfd displays at 1/9th of the page size in the top left hand corner, allmost as though the graph reverted to a4 in size (A4 is 1/8th the size of A1).
'******This is how I set up my chart
Charts.Add Before:=Worksheets(Worksheets.Count)
'Page Setup
Application.PrintCommunication = False
With ActiveChart.PageSetup
.Orientation = xlLandscape
.PaperSize = 164
End With
Application.PrintCommunication = True
'****** This is how I save the chart as PDF
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:= _
Environ("USERPROFILE") & "\Desktop\My Graphs" & MonthYear & "" & ChartXtitle & ".PDF", _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
'******
I don't understand the relationship between the graph and the page as there is no worksheet.
I don't understand the relationship between the worksheet size, the print size and the graph size
If anyone could elaorate or assist it would be apreciated.
I am working with lots of graphs and the page size is A1 (too many data points to display on A4 with the lowest marker size of 2).
I can save one graph manually as PDF and everything displays fine on the PDF.
If I save one with vba using recorded code the graph on the pfd displays at 1/9th of the page size in the top left hand corner, allmost as though the graph reverted to a4 in size (A4 is 1/8th the size of A1).
'******This is how I set up my chart
Charts.Add Before:=Worksheets(Worksheets.Count)
'Page Setup
Application.PrintCommunication = False
With ActiveChart.PageSetup
.Orientation = xlLandscape
.PaperSize = 164
End With
Application.PrintCommunication = True
'****** This is how I save the chart as PDF
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:= _
Environ("USERPROFILE") & "\Desktop\My Graphs" & MonthYear & "" & ChartXtitle & ".PDF", _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
'******
I don't understand the relationship between the graph and the page as there is no worksheet.
I don't understand the relationship between the worksheet size, the print size and the graph size
If anyone could elaorate or assist it would be apreciated.