none
How to activate an Embedded Object at the application start up? RRS feed

  • Question

  • I'd like to know if there is a way to activate an Embedded Object inside .docx at the MSWord startup, so the user doesn't have to click away in a "place-holder" icon to see its contents.

    I've alredy tried (using C#)

    DrawAspect = ovml.OleDrawAspectValues.Content
    

    and

    UpdateMode = ovml.OleUpdateModeValues.Always
    

    but they just weren't woth it...

    Thursday, February 24, 2011 5:29 PM

Answers

  • Hi Diego,

    Thanks for posting in the MSDN Forum.

    You can active an Embedded Object by this snippet. This snippet is a part of my word document-level solution.

    //doc is my Word.Document instance.
    //In the document I embedded a Excel workbook
    //Please put it in your ThisDocument_Startup method.
    doc.InlineShapes[1].OLEFormat.Activate();
    

    I hope it helps.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, February 28, 2011 8:57 AM
    Moderator