none
VS 2008 + Office 2010 + Interop 2010 RRS feed

  • Question

  • I am having issue accessing "Microsoft.Office.Interop.Word" dll in my application.

     

    I am using Vs 2008 and Office 2010,with office 2010 interop installed.

     

    I want to automate export to word,but the "Microsoft.Office.Interop.Word" reference is not listed in the .Net tab in Add reference window.

    Friday, February 11, 2011 1:39 PM

Answers

  • Hi Amu

    You should find it in the COM tab, probably as Microsoft Word 14.0 or something similar.

    The Office type libraries are COM, so you should always find them there. The entries in the .NET tab are only there if a certain combination of VS and Office versions are installed. VS 2008 will not contain anything for Office 2010 as it pre-dates Office 2010.

    But going over the COM tab will give you the exact same functionality.

    BTW, if you want to "export to Word" - meaning generate Word documents - you might want to look into Office Open XML and the Open xML SDK. For more information, see OpenxMLDeveloper.org


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Amey0072 Saturday, February 12, 2011 4:24 AM
    Friday, February 11, 2011 5:01 PM
    Moderator

All replies

  • Hi Amu

    You should find it in the COM tab, probably as Microsoft Word 14.0 or something similar.

    The Office type libraries are COM, so you should always find them there. The entries in the .NET tab are only there if a certain combination of VS and Office versions are installed. VS 2008 will not contain anything for Office 2010 as it pre-dates Office 2010.

    But going over the COM tab will give you the exact same functionality.

    BTW, if you want to "export to Word" - meaning generate Word documents - you might want to look into Office Open XML and the Open xML SDK. For more information, see OpenxMLDeveloper.org


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Amey0072 Saturday, February 12, 2011 4:24 AM
    Friday, February 11, 2011 5:01 PM
    Moderator
  • Hi Cindy,

     

    Thanks a lot for you help.

     

    Can Open Office  XML SDK be used to target office 2003 ?

     

    Regards,

     

    Ameya

    Saturday, February 12, 2011 4:28 AM
  • Hi Ameya

    Yes and No. The Open XML SDK only works with Office 2007/2010 file formats. BUT a Compatibility Pack is available that will let Word 2000, 2002 and 2003 open, edit and save in this file format. Anyone who has automatic updates already has it; anyone else can download and install it.

    In addition, Office 2003 has its own WordProcessingML vocabulary. (It's the basis of the document.xml part of an Open XML Word document.) It is possible to build native Word 2003 document files using "plain XML" tools. This is a flat file format, not a "zip package", so the SDK isn't as critical. There's a Word 2003 SDK on MSDN that provides the schema and further information on that.

     


    Cindy Meister, VSTO/Word MVP
    Saturday, February 12, 2011 7:13 AM
    Moderator