I have tried everything but I cannot figure this out. I need to insert text into an already open Word Document.
I am using C#. This is an add-in, so Word is already open. If I use the new Document method like all the examples show it brings up fresh document and won't work (obviously) . What is the correct syntax for inserting text using C# if the document is already open. Thanks.
Loading
CoryPosted Jun 15, 2009, 11:07 AM
Patrick KlitzkePosted Jun 13, 2009, 5:38 AM
you can simply use the function this.Application.Selection.TypeText("This is my new Text") to type a text. Here is a short listing for an Addin, that writes Hello every time a new document opens: