locked
Insert Data into Word Document RRS feed

  • Question

  • User1513064915 posted

    I have data in a SQL Server Database and I need to retrieve the name of the user and insert it into a word document. 

    Is this possible?

    Tuesday, August 12, 2008 10:00 PM

All replies

  • User449345775 posted

    Yes it is possible. First you need to add a word object reference to your project (Microsoft Word 10.0 Object Library). After that you can create an instance of a word apps and start playing with it. The following link might be of help:

    http://www.codeproject.com/KB/aspnet/wordapplication.aspx

    Regards

    [:)]

    Wednesday, August 13, 2008 12:30 PM
  • User1513064915 posted

    I was able to add the word object reference but everything else isn't being recognized by the intellisense.  Which means the web application isn't recognizing the word object reference.

    Any help with this.

    Monday, August 18, 2008 3:43 PM
  • User449345775 posted

    Hi I tried it on my machine and it does bring up intellisense. You need to add COM reference and then access it by using Microsoft.tools.Interop.word and it should start bringin up the intellisense.

    Regards

    [:)]

    Tuesday, August 19, 2008 10:04 AM
  • User1513064915 posted

    I have tried using "Microsoft.tools.Interop.Word"  but it doesn't recognize it.  I am using Visual Studios 2005. 

    Tuesday, August 19, 2008 10:58 AM