none
add text to anywhere in MS word document

    Question

  • Hi,

    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

    Sunday, March 26, 2006 4:42 AM

Answers

All replies

  • Hi,

    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.

    Thanks,

    Ade

     

    Monday, March 27, 2006 5:35 AM
  •  

     Hi,

     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 ? 

     Thank you

       de Oracle

    Monday, March 27, 2006 10:16 AM
  • You can learn how to use bookmark controls and XML nodes in the VSTO on-line help documentation in the MSDN Library. Here are two sections to start you on your way.

    Thanks!
    Mike Hernandez
    Community Program Manager
    VSTO Team

    Bookmark Controls
    http://msdn2.microsoft.com/en-us/library/5ykkex00(VS.80).aspx

    How to: Add Bookmark Controls to a Word Document
    http://msdn2.microsoft.com/en-us/library/5eef9s6f(VS.80).aspx

    XML Node Controls
    http://msdn2.microsoft.com/en-us/library/ydhe019c(VS.80).aspx

    How to: Add XML Nodes to a Word Document
    http://msdn2.microsoft.com/en-us/library/xsskzsky(VS.80).aspx

     

     

     

     

     

     

     

    Tuesday, March 28, 2006 7:09 AM