PPT to PDF conversion

V

venkat

Hi,

I had writted macros for PPT to PDF file conversion in Excel.
Í created User Form in Excel and i am running macros form excel.


I am getting error while running the macros As " Object doesn't support

this property or method"


And here is the code.


'Please configure adobe pdf printer before using this macro
Sub Create_PDF_of_NotesView()
Dim ActivePresentation As Object
Dim appPPT As PowerPoint.Application
Set appPPT = ActivePresentation
'Dim ActivePresentation As Application
Dim RangeType As String, NumberOfCopies As String, Collate, OutputType,

PrintHiddenSlides, _
PrintColorType, FitToPage, FrameSlides As String, ActivePrinter As
Variant
'Dim ActivePresentation As Application
Set ActivePresentation = New PowerPoint.Application
' 'Set ActivePresentation = appPPT.Application
'Set MyObject = ActivePresentation
'Dim PrintOptions As Object
' With New PowerPoint.Application

With ActivePresentation.PrintOptions
.RangeType = ppPrintAll
.NumberOfCopies = 1
.Collate = msoTrue
.OutputType = ppPrintOutputNotesPages
.PrintHiddenSlides = msoTrue
.PrintColorType = ppPrintColor
.FitToPage = msoFalse
.FrameSlides = msoFalse
.ActivePrinter = "Adobe PDF"
End With


ActivePresentation.PrintOut
MsgBox "The name of the active printer is " & _
Application.PrinterOptions
End Sub
 
S

Steve Rindsberg

Venkat said:
Hi,

I had writted macros for PPT to PDF file conversion in Excel.
Í created User Form in Excel and i am running macros form excel.

I am getting error while running the macros As " Object doesn't support

this property or method"

It helps to indicate the line at which this occurs, but I'm guessing it's here:

Set appPPT = ActivePresentation

appPPT is an application object
ActivePresentation is a presentation object
You can't mix the two

If you're doing this from within PPT, try this:

Sub Create_PDF_of_NotesView()

With ActivePresentation.PrintOptions
.RangeType = ppPrintAll
.NumberOfCopies = 1
.Collate = msoTrue
.OutputType = ppPrintOutputNotesPages
.PrintHiddenSlides = msoTrue
.PrintColorType = ppPrintColor
.FitToPage = msoFalse
.FrameSlides = msoFalse
.ActivePrinter = "Adobe PDF"
End With

ActivePresentation.PrintOut
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top