Answered Specify Controls in Selection in VSTO

  • Wednesday, May 02, 2012 7:49 AM
     
     
    I'm using Word Solution application-level project. It's possible to access Controls in a Document, But I need to access Controls in a user selection. Any thought?

All Replies

  • Thursday, May 03, 2012 7:26 AM
    Moderator
     
     

    Hi Mostapha

    I'm moving your question to the VSTO forum where you'll find more people working with the VSTO technology.

    But in order to answer your question we'll need more information:

    1. Version of Word and of VSTO involved?

    2. What kind of controls: Word content controls? Word ActiveX controls? VSTO controls placed on the document surface? Something else?


    Cindy Meister, VSTO/Word MVP

  • Saturday, May 05, 2012 4:57 AM
     
     

    Thanks Cindy. Sorry if my question was not clear.

    I'm using Office 2010 and VS 2010.

    I mean Word content controls such as  "Microsoft.Office.Tools.Word.RichTextContentControl" that are used in content of a Word document.


    • Edited by Mostapha777 Saturday, May 05, 2012 5:05 AM
    •  
  • Saturday, May 05, 2012 8:37 AM
    Moderator
     
     Answered

    Hi Mostapha

    Something like this:

    Globals.ThisAddin.Application.Selection.Range.ContentControls


    Cindy Meister, VSTO/Word MVP

    • Marked As Answer by Mostapha777 Saturday, May 05, 2012 9:54 AM
    •