Re: Excel Process Not Closed (C++) only after complete Application Shutdown
- From: "Dove" <symboldove@xxxxxxxxx>
- Date: Tue, 31 Jul 2007 22:06:06 -0500
Kevin,
I am far from an expert with C++ but from my experience in using VB6 with
Office Apps I would think the problem is in setting the app to null before
setting the work*** and workbook objects to null. Try the follwing
arrangement:
As a side note, the _ws was not in your original declarations...
_wb.SetSaved(TRUE);
_wb.SaveCopyAs(COleVariant(filePath));
_wb.Close(COleVariant(covFalse),COleVariant(filePath),COleVariant((long)0));
wb.Close();
\\ Remove Work*** references
ws = NULL;
_ws = NULL;
\\ Remove Workbook references
wb = NULL;
_wb = NULL;
\\ Close and remove App references
xlApp.Quit();
xlApp.ReleaseDispatch();
xlApp = NULL;
"Kevin" <medicalsounds@xxxxxxxxxxx> wrote in message
news:1185917032.867499.234040@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jul 31, 4:11 pm, "Ronald Dodge" <ronald.do...@xxxxxxxxxx> wrote:
Excel doesn't have a "SetSaved" property, but rather a "Saved" property
on
the workbook. Therefore, the code may be erroring out prior to getting
to
the lines dealing with closing out the workbooks and app, depending on
how
you have the app setup to handle run-time errors.
Thanks for your responce... Yes the function SetSaved is available...
also I changed it as you suggested to Save();
but no luck... process still running...
any other sugestion?
thanks in advance...
-Kevin
.
- References:
- Prev by Date: Re: Excel Process Not Closed (C++) only after complete Application Shutdown
- Next by Date: Re: *** tabs - suddenly have navigation buttons...
- Previous by thread: Re: Excel Process Not Closed (C++) only after complete Application Shutdown
- Next by thread: Re: Excel Process Not Closed (C++) only after complete Application Shutdown
- Index(es):