none
Can I use Open XML SDK 2 to create/modify word 2010 documents in my code? RRS feed

  • Question

  • Hello,

    Please let me give you the context in which I've asked this question.

    My development machine is 64 bit hardware running Windows 7 Professional N (64 bit), 64 bit Office Professional 2010 and Visual Studio Professional 2010. 

    I created a Word 2010 (Application Level Addin) using .net framework 4, Ribbons and Open XML 2 sdk. I created a windows installer (msi) using this link http://msdn.microsoft.com/en-us/vsto/ff937654.aspx.

    The installer (msi) installs successfully but my WordAddIn never loads. The error message from AddinSpy reads like this  

    'This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded...
    Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config'

    Since I'm using .net f/w 4 the assembly manager and machine configuration file should be loading from \Framework64\v4.0.30319\ of the clr and not amework\v2.0.50727\
     
    I've read blogs about Office 2010 using standard ISO/IEC 2950, while Office 2007 supports ECMA-376. Further it states that 'ISO/IEC 29500 is a direct descendant of ECMA-376. It's so direct a descendant, in fact, that ECMA-376 2nd edition is identical to ISO/IEC 29500.' http://blogs.msdn.com/b/chrisrae/archive/2010/10/06/where-is-the-documentation-for-office-s-docx-xlsx-pptx-formats-part-2-office-2010.aspx

    I found that Open XML SDK Format Architecture system support layer supports .net f/w 3.5 and 'Currently the Open XML Format SDK 2 is based on Standard Ecma-376.' http://msdn.microsoft.com/en-us/library/dd440953(v=office.12).aspx

    Therefore I'm just wondering if Open XML SDK 2 is the source of my problem? Since ISO/IEC 29500 is descendant of ECMA-376, can I use Open XML SDK 2 to create/modify word 2010 documents in my code?

    Any suggestions would be greatly appreciated.
    • Edited by Hamza Zia Monday, October 11, 2010 8:34 AM Better Formatting
    Monday, October 11, 2010 8:30 AM

Answers

  •  

    Hello Sidharth,

     

    Open XML SDK 2 was the cause, I avoided Open XML SDK 2 and my AddIn works perfectly now. Rebuilt my project from scratch using Microsoft Interop to read/write Microsoft Office 2010 documents. Issue is that there is not much documentation around for developers to read. I've done the grunt work reading articles and figuring out the problem myself. Hopefully others would not have to face the same ordeal.

    • Marked as answer by Hamza Zia Wednesday, October 20, 2010 5:15 AM
    Wednesday, October 20, 2010 5:15 AM

All replies

  • Best way to confirm this will be eliminate the Open XML SDK. you can develop a sample add-in using Visual Studio 2010 with just a message box placed in ThisAddIn_Startup. if sample add-in also fails, issue may be something else.

     


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Friday, October 15, 2010 11:32 PM
  •  

    Hello Sidharth,

     

    Open XML SDK 2 was the cause, I avoided Open XML SDK 2 and my AddIn works perfectly now. Rebuilt my project from scratch using Microsoft Interop to read/write Microsoft Office 2010 documents. Issue is that there is not much documentation around for developers to read. I've done the grunt work reading articles and figuring out the problem myself. Hopefully others would not have to face the same ordeal.

    • Marked as answer by Hamza Zia Wednesday, October 20, 2010 5:15 AM
    Wednesday, October 20, 2010 5:15 AM