VB Developer Getting Started
PowerPoint Viewer ActiveX Control |
VB Developer Getting Started |
Assuming that you have already run the Power Point Viewer SDK ActiveX installation program and MS PowerPoint Viewer and started Visual Basic, the next step is to create a project. To do this begin by selecting the "New Project" command from the file menu and select "Standard EXE" as your project type.
1. Declaring a variable named pptviewerObj to makes it a project-level variable.
Public pptviewerObj As Object
2. In form load event, create an instance of a PowerPoint Viewer SDK ActiveX.
Private Sub Form_Load()
Set pptviewerObj = CreateObject("POWERPOINTVIEWER.PowerPointViewerCtrl.1")
End Sub
3. In Form load event, Open the PPT file and define the size of PowerPoint Viewer Window.
Private Sub Form_Load()
Set pptviewerObj = CreateObject("POWERPOINTVIEWER.PowerPointViewerCtrl.1")
pptviewerObj.Open "c:\yourpptfile,pptx", 0, 0, 640, 480
End Sub