Click here to Skip to main content
15,920,111 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Here i am trying to save ppt to pdf.This is the code i have tried.But i am getting error like "no pdf converter installed".But i have installed pdf in my system.please solve this problem.

VB
Sub ppttopdf(control As IRibbonControl)
Dim path As String
    path = "D:\power"

   Save_PowerPoint_Slide_as_Images path

   
MsgBox "Exported into D:\power"

End Sub
Sub Save_PowerPoint_Slide_as_Images(path As String)
    Dim sImagePath As String
    Dim sImageName As String
    Dim sPrefix As String
    Dim oSlide As Slide '* Slide Object
    Dim lScaleWidth As Long '* Scale Width
    Dim lScaleHeight As Long '* Scale Height
    On Error GoTo Err_ImageSave

    sImagePath = path
    sPrefix = Split(ActivePresentation.Name, ".")(0)
    For Each oSlide In ActivePresentation.Slides
    sImageName = sPrefix & "-" & oSlide.SlideIndex & ".pdf"
    oSlide.Export sImagePath & "\" & sImageName, "PDF"
    Next oSlide

Err_ImageSave:
    If Err <> 0 Then
    MsgBox Err.Description
    End If
        
End Sub
Posted
Updated 23-Sep-15 3:01am
v2

1 solution

Why to force doors wide open?

Please, use Presentation.ExportAsFixedFormat Method (PowerPoint 2007 and higher)[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900