Problem with Terminating a PPT object within VB 2008

D

DAACKM

I am using the PPT COM object from VB 2008 Express to create a PPT
presentation from within VB. When I am done, I can't get PPT to
terminate/close itself unless I exit my VB application; the presentation
closes, but PPT is still around. It is as if "AppPPT.QUIT()" doesn't work.
My code is as follows:

AppPres.Close()
AppPPT.Quit()
AppShape = Nothing
Appslide = Nothing
AppPres = Nothing
AppPPT = Nothing
System.Windows.Forms.Application.DoEvents()

Any ideas on what I am doing wrong? Thanks.
 
D

DAACKM

I waited 5 minutes and the PPT task was still active, and remained so until I
ended my VB application. I even started and terminated a few other tasks in
the interim, and that had no affect.
 
D

DAACKM

Thanks, Steve. Adding the GC.Collect and GC.WaitForPendingFinalizers() as
outlined in that rather lengthy URL did the trick.
 

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

Top