none
frame property for Word.Shape programatically RRS feed

  • Question

  • Hi folks,

    might be an easy one for the right one of you, but I have been researching for quite a while now...

    How to set the frame properties of an Microsoft.Office.Interop.Word.Shape from the code (WD2010-VSTO-Addin)?

    Should be clear with a look on the screenshot:

    Cheers,
    MH_dhs


    • Edited by MH_dhs Thursday, January 26, 2012 11:39 AM
    Thursday, January 26, 2012 11:39 AM

All replies

  • Hi MH

    These "Quick style" options add a set of formatting to the Shape, so they're not available as single commands in the object model. What you have to do is figure out which properties have been used.

    For example, a black frame is simply the Line.Weight property set to something like 7 (points).

    To get two colors in the frame, you need to change the Line.Style; to something like msoLineThickThin for example.

     


    Cindy Meister, VSTO/Word MVP
    Thursday, January 26, 2012 5:09 PM
    Moderator
  • wow... Jupp, was searching for the Line-Property of the Shape-Object... Didnt think it being that easy... Started to dig for something like Shape.Frame.Line

     

    Cheers, MH

    Monday, January 30, 2012 3:16 PM