I have a number of sheets that require exporting to a .pdf file and each sheet has a print range establish that has the range name of 'Print_Area'
When this is performed manually by selecting all the sheets at once in a group, the established print ranges from each of the sheets are exported.
When I record this and place into a routine only the selected ranges in each of the sheets are exported. So if cell A1 is selected in each of the sheets, then only cell A1 is exported.
How do I tell Excel to export the range from each of the sheets (bearing in mnd the ranges will be different on each sheet) rather the the selected cells from each of the sheets?
Prior to selecting all the sheets/creating the sheet array I have tried to loop through each of the sheets to select the print range from each sheet, but as soon as all the sheets are selected then the print range from the first sheet is duplicated across all selected sheets.
The code below is a recording of the above being performed manually
TIA
When this is performed manually by selecting all the sheets at once in a group, the established print ranges from each of the sheets are exported.
When I record this and place into a routine only the selected ranges in each of the sheets are exported. So if cell A1 is selected in each of the sheets, then only cell A1 is exported.
How do I tell Excel to export the range from each of the sheets (bearing in mnd the ranges will be different on each sheet) rather the the selected cells from each of the sheets?
Prior to selecting all the sheets/creating the sheet array I have tried to loop through each of the sheets to select the print range from each sheet, but as soon as all the sheets are selected then the print range from the first sheet is duplicated across all selected sheets.
The code below is a recording of the above being performed manually
Code:
Sheets(Array("Ownership Overview Table", "Ownership Overview Charts", _
"Institutional Ownership Summary", "Global Buyers & Sellers", _
"Global Investment Style", "Global Activity by Turnover", _
"Global Regional & Country")).Select
Sheets("Ownership Overview Table").Activate
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, filename:= _
strPDFFileName _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
TIA