none
Document.Container and embedded objects RRS feed

  • Question

  • Hello VSTO world,
    I wrote an addin for Microsoft Visio in VB.net and using vsto (last version). This addin detects when the visio application is launched from Microsoft Word with the Document.container property.
    But I want to know the properties of the microsoft word shape where the visio diagram is embedded. User edits the visio diagram from microsoft word with "Open" contextual menu.
    ThanX,

    • Edited by IsteriK Wednesday, October 5, 2011 3:53 PM
    Wednesday, October 5, 2011 3:52 PM

All replies

  • Hi IsteriK,

     

    Thanks for posting in the MSDN Forum.

     

    <<This addin detects when visio application is launched from Microsoft Word with the Document.container property.>>

    Would you please show me your snippet for further trouble shooting?

     

    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.

    Friday, October 7, 2011 6:01 AM
    Moderator
  • Hi Tom,

    In Visio Addin, if the document.container is not null then Visio is launched from other application (Word, Excel, ...).

    And if Visio is launched from Word, the document.Container contains a word document and i can see all the properties of this document object.

    But I just want to determine the Document.InLineShape where from comes the embedded visio file.

    ThanX

    Friday, October 7, 2011 6:52 AM
  • Hi Isterik,

     

    <<In Visio Addin, if the document.container is not null then Visio is launched from other application (Word, Excel, ...).>>

    In my opinion, Visio Addin will work only Visio has been launched. So I’m confused with this sentence. Would you please clarify it step by step?

     

    << And if Visio is launched from Word, the document.Container contains a word document and i can see all the properties of this document object.>>

     It’s based on my experience that Word has not build-in function to launch Visio. Would you explain it?

     

    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.

    Tuesday, October 11, 2011 7:40 AM
    Moderator
  • Hi Tom, Ok I will try to clarify my question. First I develops two addins with VSTO : - Word Addin (WAD) - Visio Addin (VAD). The scenario is : - User inserts into a word document a visio diagram; - so word creates a inLineShape with this visio diagram; - User right clicks onto the visio diagram to open it (contextual menu); - so visio opens this diagram; - User changes visio diagram and quit visio application. And I want to put after the inLineShape all the visio shapes' text. But If the user opened several diagram in the same document, I can determinate where I put the visio shapes' text. I want to keep the association InLineShape and visio application running. It's a good brain teaser. ThanX
    Tuesday, October 11, 2011 9:50 AM
  • Hi IsteriK,

     

    I think I’d better reproduce your issue first. This is the plan which I want to use reproduce your issue:

     

    1.         I create a Word add-in which will create a contextual menu when we right click on Visio document which is embedded in Word document.

    2.         When I click this menu item, Visio will open the particular diagram and a Visio add-in will append a text shape in the Visio diagram.

     

    Is it right?

     

    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.

    Thursday, October 13, 2011 8:17 AM
    Moderator