The Fill, Glow, Reflection, Line, ThreeD propertis does not supported of Style.Font class RRS feed

  • Question

  • When working with styles using VBA (MS Word 2010), I cannot access the Fill, Glow, Reflection, Line,  TextShadow and ThreeD properties of the Font object of the needed style.

    Here is an example:


    Public Sub GetStyle()

        Dim nstyle As style

        Set nstyle = ActiveDocument.Styles("Normal")


        Dim glow As GlowFormat

        Set glow = Selection.Font.glow          'It is OK

        Set glow = nstyle.Font.glow             'Error - "That property is not supported for this object"

        Set glow =    'Error - "That property is not supported for this object"

    End Sub


    The same happens when trying to access the Fill, Line, Reflection, TextShadow and ThreeD  properties . But it happens only when accessing the Style.Font object.

    Is this an error in the object model or am I doing something wrong? How to get these properties?

    This issue is very important for us, please do look into it.

    Thank you in advance. 

    Monday, September 5, 2011 2:52 PM


  • Hi Alex

    It appears that the Style object has not been updated to include these properties. Possibly, the Word team simply didn't have time to integrate this and gave it a lower priority than other features for Office 2010 - only they can speak to that.

    The Word team doesn't monitor this forum, but you should be able to reach them over the Word team blog:

    To back up my statement, in the Word UI click the dialog box launcher in the Font group. Notice that these new properties aren't part of the standard dialog box. You need to click "Text effects" to access them. And if you're familiar with the new graphics engine, introduced in Office 2007, you'll see that the Text Effects dialog box resembles the Text Effect tools introduced in that version (for Word Art).

    Now open the Styles task pane and click "Manage Styles" at the bottom. In the dialog box that opens, click "Change", then in the next dialog box, Format/Font. You'll see that "Text effects" is not available here. The properties you ask about also aren't available in the object model.

    So it's currently not possible to use these properties as part of a style. Word has been slow to adapt all the new functionality provided by the new graphing engine. 2007 has more than 2010 did, but the UI and the object model still aren't "in synch"...

    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Liliane Teng Tuesday, September 13, 2011 3:41 AM
    Monday, September 5, 2011 3:31 PM