![]() |
#1
|
|||
|
|||
![]()
I like to set the color of a font in a paragraph style to an accentcolor (from the document theme).
On a range I can use: Selection.Font.Fill.ForeColor.ObjectThemeColor =wdThemeColorAccent2 however if I try to apply the color to a font in a style, I get an error 4680 (That property is not supported for this object) ActiveDocument.Styles(wdStyleHeading1).Font.Fill.F oreColor.ObjectThemeColor = wdThemeColorAccent2 I can set the color if I use ActiveDocument.Styles(wdStyleHeading1).Font.Color = ActiveDocument.DocumentTheme.ThemeColorScheme(msoT hemeAccent2) however it doesn't point to the position in the theme but uses it's RGB. That's not what I want. (Note that the .Color property of a font still works) Does anybody know how to archieve this? I was also wondering why I need the msoThemeAccent enum instead of the wdThemeColorAccent. I was under the impression that for Word objects I need the wdThemeColorAccent and for Office objects the msoThemeColor? |
Tags |
color, style, theme |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Style Font Color Changes After Close?? | the.ronin | Word | 2 | 05-20-2018 07:26 PM |
Style Font Color: Background 1 | gmgj | Word | 3 | 12-20-2017 04:00 PM |
![]() |
Jennifer Murphy | Word | 14 | 03-19-2017 03:02 PM |
Font Color Question//.Replacement.Font.Color = 12611584 | rsrasc | Word VBA | 3 | 09-05-2015 09:03 PM |
Setting Font Color and Style "permanently" | wings1080 | Word | 5 | 12-19-2014 08:44 AM |