2.5.3.160 ThemeVal

The ThemeVal function returns a dynamic theme property value.

ABNF:

 ThemeVal = "THEMEVAL(" [ val ] "," [ val ] ")"

Optional Arguments:

Name: ThemeProperty

Type: vDynamicThemeString

An argument that specifies a property to be returned.

Name: Arg2

Type: vAny

An argument to be returned.

Return Value:

Type: PtgColorRGB, vFont, PtgNumPct, PtgNum, PtgTypPt, PtgNumI, PtgBool, vAngle, PtgByte, vLength, PtgInt, vAny, PtgErr

If this function is called without argument, it returns the dynamic theme property value of the Cell_Type element that it resides in directly without invoking theme inheritance. If this function is called with an argument, it returns the property value from the dynamic theme specified by the ThemeProperty argument directly without invoking theme inheritance.

If the V attribute of the ColorSchemeIndex Cell_Type element of a shape, master, or style is equal to 65535 and the argument of the USE function token of the F attribute of the ColorSchemeIndex Cell_Type element is equal to the UniqueID attribute of a Master_Type element associated with a master, the ThemeProperty argument specifies a custom dynamic theme color scheme property value specified by the Value Cell_Type child element of the User Row_Type elements specified in the "User Row_Type" column in the vDynamicThemeString table for the arguments "Dark1", "Light1", "AccentColor", "AccentColor2", "AccentColor3", "AccentColor4", "AccentColor5", "AccentColor6", and "BackgroundColor".

If the value of the structure of a ThemeIndex, ColorSchemeIndex, or FontSchemeIndex Cell_Type element in the containing shape, master, or style is equal to zero and Arg2 is not specified, this function returns the property value specified by the "No Theme" column in the vDynamicThemeString table. If the value of the structure of a ThemeIndex, ColorSchemeIndex, EffectSchemeIndex, ConnectorSchemeIndex, or FontSchemeIndex Cell_Type element in the containing shape, master, or style is equal to zero and Arg2 is specified, this function returns the value of Arg2.

If the value of the structure of a QuickStyleVariation Cell_Type element in the containing shape, master, or style is greater than or equal to 2 and less than or equal to 15, then the formula evaluation of the "TextColor", "LineColor", and "FillColor" vDynamicThemeString ThemeProperty arguments are affected as described in the QuickStyleVariation Cell_Type element table.

If the value of the ThemeProperty argument is not found in the vDynamicThemeString table, this function returns a PtgErr parse token with a value equal to #VALUE!.