S
Sascha Rasmussen
Hello,
I'm trying to write my own FileSave-Dialog for several MS-Office-
Applications and succeeded in Word and Excel so far, now Powerpoint is
giving me headaches.
Here is my code
Module Globals
Public blnEventHandling As Boolean
Dim AppClass As New EventClass
Private Sub Auto_Open()
Set AppClass.PPTEvent = Application
blnEventHandling = True
End Sub
ClassModule EventClass
Public WithEvents PPTEvent As Application
Private Sub PPTEvent_PresentationBeforeSave(ByVal Pres As
Presentation, _
Cancel As Boolean)
Cancel = True
If Globals.blnEventHandling = True Then
Globals.blnEventHandling = False
Pres.SaveAs FileName:="C:\temp\foobar.ppt"
Globals.blnEventHandling = True
End If
End Sub
Pres.SaveAs always throws a Runtime Error '-2147467259 (80004005)'
Presentation (unknown member): Failed
After that the presentation isn't saved, but the window caption reads
"foobar.ppt".
Can anyone provide me some help?
Thanks in advance,
Sascha Rasmussen
I'm trying to write my own FileSave-Dialog for several MS-Office-
Applications and succeeded in Word and Excel so far, now Powerpoint is
giving me headaches.
Here is my code
Module Globals
Public blnEventHandling As Boolean
Dim AppClass As New EventClass
Private Sub Auto_Open()
Set AppClass.PPTEvent = Application
blnEventHandling = True
End Sub
ClassModule EventClass
Public WithEvents PPTEvent As Application
Private Sub PPTEvent_PresentationBeforeSave(ByVal Pres As
Presentation, _
Cancel As Boolean)
Cancel = True
If Globals.blnEventHandling = True Then
Globals.blnEventHandling = False
Pres.SaveAs FileName:="C:\temp\foobar.ppt"
Globals.blnEventHandling = True
End If
End Sub
Pres.SaveAs always throws a Runtime Error '-2147467259 (80004005)'
Presentation (unknown member): Failed
After that the presentation isn't saved, but the window caption reads
"foobar.ppt".
Can anyone provide me some help?
Thanks in advance,
Sascha Rasmussen