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
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