Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-09-2017, 11:05 AM
mashiulalam mashiulalam is offline VBA Macro to Save PPT to PDF Windows 8 VBA Macro to Save PPT to PDF Office 2013
Novice
VBA Macro to Save PPT to PDF
 
Join Date: May 2017
Posts: 1
mashiulalam is on a distinguished road
Default VBA Macro to Save PPT to PDF

Hi,

I am looking for VBA macro code for saving existing ppt to pdf in the same file folder.

Any help would be highly appreciated.



Thanks.

Mashiul
Reply With Quote
  #2  
Old 05-10-2017, 08:11 AM
JohnWilson JohnWilson is offline VBA Macro to Save PPT to PDF Windows 7 64bit VBA Macro to Save PPT to PDF Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Something like:

Code:
Sub toPDF()
Dim opres As Presentation
Set opres = ActivePresentation
Dim strName As String
strName = Left(opres.Name, InStrRev(opres.Name, ".") - 1)
opres.SaveCopyAs FileName:=opres.Path & "\" & strName & ".PDF", FileFormat:=ppSaveAsPDF
MsgBox "Saved as :" & opres.Path & "\" & strName & ".PDF"
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Macro to Save PPT to PDF Macro to save as pdf with ability to choose save as folder rvessio Word VBA 4 07-25-2016 12:37 PM
VBA Macro to Save PPT to PDF Macro: How to get this macro to save to a specific location LOUF Word VBA 1 12-07-2015 06:47 PM
VBA Macro to Save PPT to PDF Macro to save as PDF but with a different name shabbaranks Word VBA 2 05-20-2011 01:02 AM
Macro to Save Help clarkson001 Word 0 02-14-2011 06:41 AM
Macro Won't Save lou0915 Word VBA 2 10-17-2009 08:13 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:22 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft