Answered by:

add text to anywhere in MS word document

Question

I created app to send form data to Word. Its working properly. But now I want send that data anywhere in the document. For example begining, end and center. Here Im not talking about align text. Acctually I want send those data to certain palces. Please Help me

All replies

I'm not entirely clear on your scenario here but in general if you want to associate regions of your document with data then the best way to do this is using either VSTO Bookmarks for XmlNodes. You simply need to add the appropriate bookmark or node control to your document and then have the VSTO customization set the Text or InnerText property to alter what the document displays.

I hope this answers your question. If not please clarify what you're trying to get your VSTO customization to do.

First thank you for your comments. Acctually this is the case, I have a windows form that created using C#. Using that form Im going to collect someones personal infromations. Like name, address and other using text boxes. Now I want to send those data to Word document that was already created and save in hard disk. I want to send that data to anywhere of the document. As you mensioned, Can I do this task this way ? Before sending data I bookmark the location( places ) in the document where I want to send data, and according to bookmark Im going to send data. Can I do that ? if so how to access bookmarks using my coding ?