![]() | |
| |||||||
| Home | Register | Blogs | FAQ | Members List | Calendar | Downloads | Arcade | Mark Forums Read |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 |
| Ìëàäåíåö Join Date: Aug 2006 Location: Currently in Germany.
Posts: 2
Rep Power: 0 Reputation:
10 | How to steer the Word documents in already opened Word application. Hi, I have the following question. I’m writing the program in C++, which is opening in background the Word document, modifying and then closing it. Till now each document has been opened with separate Word application and after modification has been closed: CApplication objWord; if(!objWord.CreateDispatch("Word.Application")) ..... CDocuments docs(objWord.get_Documents()); doc.AttachDispatch(docs.Open(....)); ..... docs.Close(covFalse,covOptional,covOptional); objWord.Quit(covFalse,covTrue,covFalse); Now I want to open Word application only once, and then in consecutive order open, manipulate and close the documents. Of course I can check whether “winword.exe” process existing or not and also read the PID, but how can I steer the document? |
| | |
| | #2 |
| Ìëàäåíåö Join Date: Aug 2006 Location: Currently in Germany.
Posts: 2
Rep Power: 0 Reputation:
10 | How can I get access to the already opened Word application? Dear Colleagues, I found that my question was not presented very clear. I'll try to explain it better. Firs of all I should mention that I’m faraway from COM and OLE programming, but now I'm working on one project and I guess I need to learn that. The problem is following. I have a Windows service, which is working according to some algorithm. From time to time it creates the process, runs the MS Word application, opens the Word document, manipulates it and then closes the document and Word application. Now I should increase the speed of this process. I have found that starting the Word application consumed most of the time. Therefore I have decided to open the Word application only once and then, when it is necessary, open and manipulate the Word documents. The only information I have is PID (PROCESS_INFORMATION) of the process, created by CreateProcess. My question is following. How can I get access to the already opened Word application, open there the Word document and manipulate it. Thank you in advance, Suren Karabekyan |
| | |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Download Free Ebooks (Computers, Physics, Math and more) | acid | TWARM | 219 | Jul 16, 2008 07:04 |
| WORLD PRESS PHOTO 2004 EXHIBITION OPENED IN YEREVAN | PsilocybeLarvae | News | 8 | Mar 7, 2005 14:20 |
| CEU Summer University Program Description | PsilocybeLarvae | Science and Education | 0 | Jan 11, 2005 12:41 |
| Tray Helper - application you need ;-D and plugin by ACiD soft | irekz | Languages, Compilers and Interpreters | 0 | Jun 5, 2002 05:05 |
| Application To Date My Daughter | PsilocybeLarvae | Fun | 0 | May 7, 2002 23:03 |