Hi
I really hope someone can guide me please
I have a pivot table. There are over 700 individual records in my table.
When I filter on the records in my first row one by one the A9 will always state the individual record
My code below will save the records as a PDF however I have to filter and run my macro for each one.
Can someone please show me how to make it run for all records
Thanks in Advance
Sub Save_PDF()
Dim saveLocation As String
saveLocation = "C:\Users\SAINYSHAY\Desktop\PRINTS\PDF\" & Sheets("PRINTS").Range("A9").Value
Dim targetPivotTable As PivotTable
Set targetPivotTable = Sheets("PRINTS").PivotTables("PivotTable1")
Dim targetExportRange As Range
Set targetExportRange = targetPivotTable.TableRange2
targetExportRange.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=saveLocation, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End Sub
I really hope someone can guide me please
I have a pivot table. There are over 700 individual records in my table.
When I filter on the records in my first row one by one the A9 will always state the individual record
My code below will save the records as a PDF however I have to filter and run my macro for each one.
Can someone please show me how to make it run for all records
Thanks in Advance
Sub Save_PDF()
Dim saveLocation As String
saveLocation = "C:\Users\SAINYSHAY\Desktop\PRINTS\PDF\" & Sheets("PRINTS").Range("A9").Value
Dim targetPivotTable As PivotTable
Set targetPivotTable = Sheets("PRINTS").PivotTables("PivotTable1")
Dim targetExportRange As Range
Set targetExportRange = targetPivotTable.TableRange2
targetExportRange.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=saveLocation, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End Sub