Board index » cppbuilder » ATL Word Automation - Closing my C++ application shuts down Word

ATL Word Automation - Closing my C++ application shuts down Word


2006-03-28 11:00:06 PM
cppbuilder76
Here's the situation I'm having. When I close the application I've
developed, my source code
disconnects from any document I have open, and disconnects from the
Word application.
If I happen to have Word running with other documents open (that
weren't opened/created by
the application I developed), upon exiting, my application will shut
down Word with it and take
the open documents with it.
Example: I open 5 documents in Word...then I run my application and
it connects to a Word document (not
one that is already open) and does what it's supposed
to do. I exit my application (which disconnects
from the Word document that only it accessed) and Word
goes away completely taking the
5 previously opened documents with it. I've tried
tracing through source code, but it takes me on
a journey through various header files provided by the
Borland software.
Has anyone experieced this problem? Thanks.
...Charlie
 
 

Re:ATL Word Automation - Closing my C++ application shuts down Word

Hi Charlie,
Maybe you have to change the code to open Word.
You have try to execute Word first, what happens?
What code you use to create the Word's documents?
Charlie Epperly escribi?
Quote
Here's the situation I'm having. When I close the application I've
developed, my source code
disconnects from any document I have open, and disconnects from the
Word application.
If I happen to have Word running with other documents open (that
weren't opened/created by
the application I developed), upon exiting, my application will shut
down Word with it and take
the open documents with it.

Example: I open 5 documents in Word...then I run my application and
it connects to a Word document (not
one that is already open) and does what it's supposed
to do. I exit my application (which disconnects
from the Word document that only it accessed) and Word
goes away completely taking the
5 previously opened documents with it. I've tried
tracing through source code, but it takes me on
a journey through various header files provided by the
Borland software.

Has anyone experieced this problem? Thanks.


...Charlie


 

Re:ATL Word Automation - Closing my C++ application shuts down Word

Hello Charlie,
maybe we have the same problem, see my thread
TWordApplication: Different behaviour Delphi/C++Builder (WORD closes)
in the newsgroups
borland.public.cppbuilder.vcl.components.using
borland.public.delphi.vcl.components.using.win32
Unfortunately I don't know the reason.
Udo
 

{smallsort}