C
Casey Brown
Hi,
I am having a problem with a VB6 app that uses PPT 2000 to create
presentations, and I thought some of you here might have some insights into
PPT intrinsics that might be contributing to my problem. Sorry this is a
long explanation...
Basically, my app takes info from a web service, opens ppt and creates a
presentation with the info, then closes ppt and calls it a day. It works
fine almost all of the time. Sometimes, however, it doesn't get past the
call below to GetObject. The last line in my debugging file is "About to
call GetObject"--the error handling code is never reached. GetObject
appears just to hang and never either succeeds or fails! (DebugPrint just
prints to a text file)
A problem for me is that this is running on a client's machine, so I don't
have much data other than the aborted debug log. I know that it ran for
about a week before GetObject failed (though I don't know how many times per
day--probably on the order of 10-20, not thousands). After GetObject fails
once, it continues to fail until Powerpoint is reinstalled, at which point
it seems to work again.
Anyone have any idea what might be going on? I know it's vague, but I
thought maybe someone might have run into something similar. What sort of
things might PPT be doing that would be preventing GetObject from returning?
Might autosave files affect things? Waiting for some type of user input?
Waiting for the Red Sox or Cubs to win the World Series?
Thanks for any thoughts you might have!
-Casey
'my code snippets are below:
Private Function OpenPPT(path As String) As Boolean
On Error GoTo OpenPPTError
....
wasRunning = True
DebugPrint "About to call GetObject"
Set pptApp_ = GetObject(, PPTAPPNAME)
DebugPrint "Just called GetObject. WasRunning is " & wasRunning
....
OpenPPTError:
DebugPrint "Error! Number: " & Err.Number & ", Description: " &
Err.Description
If Err.Number = 429 Then
'determined that ppt was not already open
wasRunning = False
Err.Clear
Else
....
I am having a problem with a VB6 app that uses PPT 2000 to create
presentations, and I thought some of you here might have some insights into
PPT intrinsics that might be contributing to my problem. Sorry this is a
long explanation...
Basically, my app takes info from a web service, opens ppt and creates a
presentation with the info, then closes ppt and calls it a day. It works
fine almost all of the time. Sometimes, however, it doesn't get past the
call below to GetObject. The last line in my debugging file is "About to
call GetObject"--the error handling code is never reached. GetObject
appears just to hang and never either succeeds or fails! (DebugPrint just
prints to a text file)
A problem for me is that this is running on a client's machine, so I don't
have much data other than the aborted debug log. I know that it ran for
about a week before GetObject failed (though I don't know how many times per
day--probably on the order of 10-20, not thousands). After GetObject fails
once, it continues to fail until Powerpoint is reinstalled, at which point
it seems to work again.
Anyone have any idea what might be going on? I know it's vague, but I
thought maybe someone might have run into something similar. What sort of
things might PPT be doing that would be preventing GetObject from returning?
Might autosave files affect things? Waiting for some type of user input?
Waiting for the Red Sox or Cubs to win the World Series?
Thanks for any thoughts you might have!
-Casey
'my code snippets are below:
Private Function OpenPPT(path As String) As Boolean
On Error GoTo OpenPPTError
....
wasRunning = True
DebugPrint "About to call GetObject"
Set pptApp_ = GetObject(, PPTAPPNAME)
DebugPrint "Just called GetObject. WasRunning is " & wasRunning
....
OpenPPTError:
DebugPrint "Error! Number: " & Err.Number & ", Description: " &
Err.Description
If Err.Number = 429 Then
'determined that ppt was not already open
wasRunning = False
Err.Clear
Else
....