Home |
Search |
Today's Posts |
#1
|
|||
|
|||
How to launch and control WORD using .NET?
We've a requirement to launnch a Word document pre-filled using .NET
application. I know we can use System.Diagnostic.Process("word.exe"). However but then we don't have a control. What can we do to launch as well as control WORD program. Any help??? |
#2
|
|||
|
|||
Hi ?B?UE5heWFr?=,
We've a requirement to launnch a Word document pre-filled using .NET application. I know we can use System.Diagnostic.Process("word.exe"). However but then we don't have a control. What can we do to launch as well as control WORD program. I believe there is information on this on MSDN and/or in the Knowledge Base, on microsoft.com. Also, the exact syntax will vary, according to which language you plan to use. But basically: 1. Set a reference to the Word Object Library (COM tab) 2. Declare a global object variable, and set it to the Word.ApplicationClass 3. Use the New keyword to instantiate the class and create a new instance of the Word application, assigning it to the object variable Note that this is not the correct group in which to pursue this. If you'd bothered to read any of the posts in the group, you'd have noticed it's an END-USER group. Questions about automating Office applicatins belong in an office.developer newsgroup. Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |