locked
"The customization assembly could not be found or could not be loaded.” RRS feed

  • Question

  • Hello,

    I'm using VSTO 2010 and created a Word 2010 Template project as follows (dev machine with Windows Server 2008 R2, Office 2010, VSTO 2010):

    Create New C# Project > Office > 2010 > Word 2010 Template

    Attach the following code to the Document New event:

            private void ThisDocument_New()

            {

                object fixedFormatExtClassPtr = null;

                this.ExportAsFixedFormat(@"C:\temp\MyDocument.PDF", Word.WdExportFormat.wdExportFormatPDF, false, 0, 0, 0, 0, 0, false, false, 0, false, false, false, ref fixedFormatExtClassPtr);

            }

    Hit F5. The following exception will be displayed:

        “The customization assembly could not be found or could not be loaded.”

    The same behavior occurs when executing many other lines of code.

    Any ideas?

    Regards,

    António Ribeiro


    aribeiro

    Tuesday, April 2, 2013 11:35 AM

Answers

  • Hi Antonio,

    Thank you for posting in the MSDN Forum.

    You can change

    object fixedFormatExtClassPtr =  null;

    into

    object fixedFormatExtClassPtr = System.Type.Missing;

    Besides, you'll need to make sure that you have access into C:\temp.

    Best regards,


    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Edited by Quist Zhang Thursday, April 4, 2013 5:40 AM
    • Proposed as answer by Quist Zhang Wednesday, April 17, 2013 12:08 PM
    • Marked as answer by Quist Zhang Wednesday, April 17, 2013 12:08 PM
    Thursday, April 4, 2013 5:40 AM

All replies

  • Hi Antonio,

    Thank you for posting in the MSDN Forum.

    You can change

    object fixedFormatExtClassPtr =  null;

    into

    object fixedFormatExtClassPtr = System.Type.Missing;

    Besides, you'll need to make sure that you have access into C:\temp.

    Best regards,


    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Edited by Quist Zhang Thursday, April 4, 2013 5:40 AM
    • Proposed as answer by Quist Zhang Wednesday, April 17, 2013 12:08 PM
    • Marked as answer by Quist Zhang Wednesday, April 17, 2013 12:08 PM
    Thursday, April 4, 2013 5:40 AM
  • Hi Antonio,

    I temporarily marked my reply as answer. You can unmark it if it provides no help.

    Please feel free to let us know if you need any further help.

    Have a nice day.


    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, April 17, 2013 12:09 PM