Savelyev_Vyacheslav

VBA safePDF

May 26th, 2022 (edited)
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub SavePresentationAsPDF2()
  2.     Dim pptName As String
  3.     Dim PDFName As String
  4.     ' Save PowerPoint as PDF
  5.    pptName = ActivePresentation.FullName
  6.     ' Replace PowerPoint file extension in the name to PDF
  7.    PDFName = Left(pptName, InStr(pptName, ".p")) & "pdf"
  8.     ActivePresentation.ExportAsFixedFormat PDFName, 2  ' ppFixedFormatTypePDF = 2
  9. End Sub
  10.  
  11.  
  12.  
Add Comment
Please, Sign In to add comment