PDF is always the universal format for sending the files. With lot of versions of MS Office and other Office suites around .. it is better to circulate the Deck as a PDF
The following snippet converts the Presentation to a PDF and saves in the same folder of the PPT
ActivePresentation.ExportAsFixedFormat ActivePresentation.Path & "\" & ActivePresentation.Name & ".pdf", ppFixedFormatTypePDF, ppFixedFormatIntentPrint
The details in blog are very useful and thanks for the same.
ReplyDeleteCan you increase the width of the blog. Some images are getting cut at the ends, and we will also have less scrolling
Good Post, I was confuse in this case actually i was make A+ powerpoint presentation but i was confusing in file converting case to PDF. Thank you
ReplyDeleteRegard
Harry lee
You can save/convert ppt or pptx files to pdf format using VB.NET with Aspose.Slides for .NET Library. You can view the code to convert ppt or pptx files here.
ReplyDeleteHi,
ReplyDeleteI had a similar idea and cannot find why I have errors. The idea was to create a macro opening all my .pptx within a specified folder and create two kinds of pdfs from these.
Note: these pdf are password protected.
However I am now blocked as it works fine for the 1st powerpoint and then it crashes for the second telling me that the Exportasfixedformat does not work.
Would you have any tips for me, please?
Public wbPPT As Presentation
Public fPPT As String
Public fInput As String
Public fpath As String
Sub BatchBuilding_pdf_from_PPT()
Dim nfichier As String, nfichier2 As String, intpos As Byte
fInput = InputBox("Please enter the local address where are stored your PPT files (e.g. C:\... ) ")
If fInput = "" Then
MsgBox ("No path entered, the Importing process is cancelled")
Exit Sub
Else
If Right(fInput, 1) <> "\" Then
fInput = fInput & "\"
Else
fInput = fInput
End If
fpath = fInput
fPPT = Dir(fpath & "*.pptx")
Do While Len(fPPT) > 0
nfichier = fPPT
'find where is the extension in the name
intpos = InStrRev(nfichier, ".")
'replace the pptx by pdf
nfichier = Left(nfichier, intpos - 1)
nfichier2 = nfichier & ".pdf"
With ProtectedViewWindows.Open(fpath & fPPT, "password").Edit("password")
.ExportAsFixedFormat Path:=fpath & "Without notes\" & nfichier2, FixedFormatType:=ppFixedFormatTypePDF, Intent:=ppFixedFormatIntentPrint, FrameSlides:=msoTrue, PrintHiddenSlides:=msoTrue, OutputType:=ppPrintOutputSlides
.ExportAsFixedFormat Path:=fpath & "With notes\" & nfichier2, FixedFormatType:=ppFixedFormatTypePDF, Intent:=ppFixedFormatIntentPrint, FrameSlides:=msoTrue, PrintHiddenSlides:=msoTrue, OutputType:=ppPrintOutputNotesPages
.Close
End With
fPPT = Dir
'same code as before to prepare for the next file (just in case)
nfichier = fPPT
'find where is the extension in the name
intpos = InStrRev(nfichier, ".")
'replace the pptx by pdf
nfichier = Left(nfichier, intpos - 1)
nfichier2 = nfichier & ".pdf"
Loop
MsgBox ("All presentations have been PDFied")
End If
End Sub
Thanks in advance.
This is a great snippet. I have been trying to format it to create a pdf of just one page. Has anyone cracked that code. Thanks.
ReplyDelete