i have this code that prints a range B5:K100. however it seems to have only worked the first time I used it...now as the pivot table changes, nothing changes on the PDF. which is really weird because i removed columns and the formatting of the pivot table...but when I prints a PDF none of the changes are made.

here's the code.

Sub PDFActiveSheetPDF()
  Dim IsCreated As Boolean
  Dim i As Long
  Dim PdfFile As String, Title As String
  Dim OutlApp As Object

 
  ' Define PDF filename
  PdfFile = ActiveWorkbook.FullName
  i = InStrRev(PdfFile, "ACTIVE PROJECT LIST")
  If i > 1 Then PdfFile = Left(PdfFile, i - 1)
  PdfFile = "ACTIVE PROJECT LIST" & ".pdf"
 
  ' Export activesheet as PDF
    Worksheets("ACTIVE PROJECTS").Range("B5:K100").ExportAsFixedFormat _
     Type:=xlTypePDF, Filename:="S:\" & PdfFile, Quality:=xlQualityStandard, _
      IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
  Shell "cmd /c " & """" & PdfFile & """", vbNormal
        
 
End Sub