locked
How to open word doc, and update the doc RRS feed

  • Question

  • hi.
    I use:
    - Microsoft Visual Studio 2005

    - Microsoft Word 2003

    - Programming Language: C#


    I have try to open a doc word and update some text of the doc.
    i have a search, and I try do http://www.c-sharpcorner.com/UploadFile/amrish_deep/WordAutomation05102007223934PM/WordAutomation.aspx

    My problem is, when i add the referrence Microsoft Office 11.0 Object Library. The referrence is add ok, but I only have the access to the "Microsoft.Office.Core" and do not have the access to the "Microsoft.Office.Interop.Word".

    do I need add others references?
    Is there another way to do that (open a doc word and update some text of the doc)?


    thans for all.

    astro
    Friday, January 9, 2009 12:14 PM

Answers

  • This is because you need to add the other reference as well:

    Microsoft Word 11.0 Object Library

    then IntelliSense will pick up on what you're doing and it will work.

    Kettering University Co-Op davi9267@kettering.edu
    • Proposed as answer by Harry Zhu Tuesday, January 13, 2009 8:54 AM
    • Marked as answer by astro__pc Thursday, January 15, 2009 5:08 PM
    Friday, January 9, 2009 12:44 PM

All replies

  • According to your link:

    Did you add both references:

    Microsoft Office 11.0 Object Library

    &

    Microsoft Word 11.0 Object Library

    ???

    This might be your problem.

    Kettering University Co-Op davi9267@kettering.edu
    • Proposed as answer by Xystus777 Friday, January 9, 2009 12:33 PM
    Friday, January 9, 2009 12:30 PM
  • Add a reference to the Microsoft Word 11.0 Object Library, and you will get the reference to Interop.Word
    Ewald - Please remember to mark the replies as answers if they help.
    • Proposed as answer by Xystus777 Friday, January 9, 2009 12:33 PM
    Friday, January 9, 2009 12:31 PM
  • I only add  the reference "Microsoft Office 11.0 Object Library".
    When I make the  using Microsoft.Office.(...) it only show Microsoft.Office.Core and not Microsoft.Office.Interop.
    astro
    Friday, January 9, 2009 12:41 PM
  • This is because you need to add the other reference as well:

    Microsoft Word 11.0 Object Library

    then IntelliSense will pick up on what you're doing and it will work.

    Kettering University Co-Op davi9267@kettering.edu
    • Proposed as answer by Harry Zhu Tuesday, January 13, 2009 8:54 AM
    • Marked as answer by astro__pc Thursday, January 15, 2009 5:08 PM
    Friday, January 9, 2009 12:44 PM