更新时间:2023-01-27 14:31:22
I can confirm the bug. The following constants are defined in the type library:
Const xlThemeColorDark1 = 1
Const xlThemeColorLight1 = 2
Const xlThemeColorDark2 = 3
Const xlThemeColorLight2 = 4
Const xlThemeColorAccent1 = 5
Const xlThemeColorAccent2 = 6
Const xlThemeColorAccent3 = 7
Const xlThemeColorAccent4 = 8
Const xlThemeColorAccent5 = 9
Const xlThemeColorAccent6 = 10
Const xlThemeColorHyperlink = 11
Const xlThemeColorFollowedHyperlink = 12
Const xlThemeColorDark1 = 1
Const xlThemeColorLight1 = 2
Const xlThemeColorDark2 = 3
Const xlThemeColorLight2 = 4
Const xlThemeColorAccent1 = 5
Const xlThemeColorAccent2 = 6
Const xlThemeColorAccent3 = 7
Const xlThemeColorAccent4 = 8
Const xlThemeColorAccent5 = 9
Const xlThemeColorAccent6 = 10
Const xlThemeColorHyperlink = 11
Const xlThemeColorFollowedHyperlink = 12
以下赋值按预期工作:
Const xlThemeColorLight1 = 1
Const xlThemeColorDark1 = 2 b
Const xlThemeColorLight2 = 3
Const xlThemeColorDark2 = 4
Const xlThemeColorLight1 = 1
Const xlThemeColorDark1 = 2
Const xlThemeColorLight2 = 3
Const xlThemeColorDark2 = 4
TinteAndShade仅适用于形状:
TinteAndShade only works for shapes:
ActiveSheet.Shapes(1).TextFrame.Characters.Font.TintAndShade = -0.5
ActiveSheet.Shapes(1).TextFrame.Characters.Font.TintAndShade = -0.5