So I have the following code that currently runs through each slicer option and prints each slicer option to its own PDF:
Sub SlicerPDF()
Dim wbk As Workbook
Set wbk = ActiveWorkbook
Dim sI As SlicerItem, sI2 As SlicerItem, sC As SlicerCache
Set sC = ActiveWorkbook.SlicerCaches("Slicer_APSid")
With sC
For Each sI In sC.SlicerItems
sC.ClearManualFilter
For Each sI2 In sC.SlicerItems
If sI.Name = sI2.Name Then sI2.Selected = True Else: sI2.Selected = False
Next
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
wbk.Path & "\" & Range("A1").Value & ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
False
Next
End With
End Sub
How can I alter this to keep the PDF open and have it print all the slicer options to one single PDF file?
Thanks
Bookmarks