PowerPoint 2000 automation

  • Thread starter Thread starter Tommie
  • Start date Start date
T

Tommie

What I am trying to do through PP is activate Word and
display the Word fileopen dialog box, have the user
select a document, open the Word document, then switch to
PowerPoint and display the fileopen dialog box, have the
user select the presentation, and then have the PP
presentation open. The Word document opens successfully,
and the switch to PP appears successful with the FileOpen
dialog box displaying for the user to select the
presentation. But when I select the presentation from the
dialog box, the presentation does not open, and I get no
errors. The code for the PP part of it is a follows:


Public WordApp As Word.Application
Public ppApp As PowerPoint.Application
Public ppPres As PowerPoint.Presentation

Public Sub GetPptFile()
Word.Application.WindowState = 2

Set ppApp = New PowerPoint.Application
ppApp.Visible = True

With ppApp.FileDialog(ppFileDialogOpen)

' Set file filter flags
Call .Extensions.Add("*.PPT", "PowerPoint
Presentation")
Call .Extensions.Add("*.PPS", "PowerPoint Show")

.ActionButtonName = "Open"
.DefaultDirectoryRegKey = "Default"
.DialogTitle = "Open"
.DirectoriesOnly = False
.InitialView = ppFileDialogViewPreview
.IsMultiSelect = False
.IsPrintEnabled = False
.IsReadOnlyEnabled = True
.OnAction = "ProcessSelection"
.UseODMADlgs = False

.Launch
End With
End Sub

Public Sub ProcessSelection(ByVal oDlg As FileDialog)

If oDlg.Files.Count = 0 Then Exit Sub
Presentations.Open oDlg.Files(1)

End Sub
 
Hi,

Some of our vba people have been away. Could you maybe repost to get their
attention?

--
Regards,

Glen Millar
Microsoft PPT MVP
http://www.powerpointworkbench.com/
Please tell us your ppt version, and get back to us here
Remove spaces from signature
 

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

Back
Top