Muhammad Nasir Mahmood
New Member
- Joined
- Nov 29, 2024
- Messages
- 4
- Office Version
- 365
- Platform
- Windows
Please help me to rectify the error in this code
Sub ExportPDFWithoutTags()
Dim pptPres As Presentation
Dim pdfPath As String
' Set the active presentation
Set pptPres = Application.ActivePresentation
' Define the path to save the PDF
pdfPath = Environ("USERPROFILE") & "\Documents\" & Replace(pptPres.Name, ".pptx", ".pdf")
' Export the presentation as a PDF without tags
pptPres.ExportAsFixedFormat _
Path:=pdfPath, _
FixedFormatType:=2, _
Intent:=1, _
FrameSlides:=0, _
HandoutOrder:=0, _
IncludeDocProperties:=False, _
DocStructureTags:=False, _
BitmapMissingFonts:=True, _
UseISO19005_1:=False
MsgBox "PDF exported without tags to: " & pdfPath, vbInformation
End Sub
Sub ExportPDFWithoutTags()
Dim pptPres As Presentation
Dim pdfPath As String
' Set the active presentation
Set pptPres = Application.ActivePresentation
' Define the path to save the PDF
pdfPath = Environ("USERPROFILE") & "\Documents\" & Replace(pptPres.Name, ".pptx", ".pdf")
' Export the presentation as a PDF without tags
pptPres.ExportAsFixedFormat _
Path:=pdfPath, _
FixedFormatType:=2, _
Intent:=1, _
FrameSlides:=0, _
HandoutOrder:=0, _
IncludeDocProperties:=False, _
DocStructureTags:=False, _
BitmapMissingFonts:=True, _
UseISO19005_1:=False
MsgBox "PDF exported without tags to: " & pdfPath, vbInformation
End Sub