Universal Document Converter
Product Overview
Download
Purchase
Tutorials
Developer Solutions
Support Service
About fCoder Group


      Site search
   


      Video tutorial
Show tutorial


Main page>Developer Solutions>Popular Applications as COM-servers

Print Microsoft PowerPoint Presentation to Image Using Visual Basic.NET


Universal Document Converter is virtual printer software that saves any document you print as an image file. Below is a source code example that can help you to accomplish your task with Universal Document Converter. Please let us know if you cannot find the solution you need.

' Microsoft PowerPoint 97 or above and Universal Document Converter
' should be installed on your PC and PowerPoint should be activated.

Private Sub PrintPowerPointPresentation(ByVal strFilePath As String)

' Run Microsoft PowerPoint as COM-server
  On Error Resume Next
  Dim App As Object
  Dim Presentation As Object
  Dim nSlides As Long

  App = CreateObject("PowerPoint.Application")

' Open presentation from file
  Presentation = App.Presentations.Open(strFilePath,True,True,False)

  If Presentation = Not Nothing Then

  ' Print all slides from the presentation
    Presentation.PrintOptions.PrintInBackground = 0
    Presentation.PrintOptions.ActivePrinter = _
                                           "Universal Document Converter"
    Call Presentation.PrintOut()

  ' Close the presentation
    Call Presentation.Close()
    Presentation = Nothing

  End If

' Close Microsoft PowerPoint
  Call App.Quit()
  App = Nothing

End Sub



Related topics
Popular pages
Popular solutions


© 2001-2008 fCoder Group, Inc. About fCoder Group | Privacy Policy | Site Map