
Error while adding a powerpoint presentation to ppt object
I'm creating a Windows NT (server) service that creates a powerpoint
presentation in
Visual Basic. I'm using the powerpoint object library
to do this. After declaring an powerpoint.application object I'm using
the following statement
PresNew = PPTapplication.Presentations.Add(msofalse)
For some reason this doesn't always work, but problems only occur at
run-time, NEVER when I step through the code with the de{*filter*}. I found
that a workaround for the problem is to write a loop that tries to
execute the above statement for a couple of times (less than ten) or
until the statement is succesful. This worked well on my development
machine.
Now, I'm moving on to a test server on which nothing else runs. I
installed the NT service that executes the code in the dll, but for
some reason, even a loop of 10 million times is not enough to
succesfully execute the statement in question on the server. I also
tried the kernel32 "sleep" function, pausing execution for 100 seconds,
but unfortunately ..no results!
Does anyone know this problem and a solution for it?
Thanks,
Mark.
Sent via Deja.com http://www.*-*-*.com/
Before you buy.