THEMEVAL Function

Retrieves values from the active theme.

Version Information

Version Added: Visio 2013

Syntax

THEMEVAL([ "theme_value"][, default])

Parameters

Name Required/Optional Data Type Description
"theme_value"
Optional
String
The name of a cell in the theme definition to get a value from.
default
Optional
Various
A default value if the document is not themed (there is no theme definition).

Remarks

If the THEMEVAL function does not receive any arguments, it returns the themed value of the host cell. This is the value stored in the definition of the current theme. The host cell must be capable of being themed to return a value; if the cell is not capable of being themed, THEMEVAL returns an error.

If the THEMEVAL function receives a single argument, it retrieves the value from the theme definition passed in as the argument. The argument passed in for the first parameter must be an integer or one of the exact strings listed in the table below.

The THEMEVAL function can also accept an integer for the first parameter, as a value between 1 and 8. Using integer values retrieves a color by index from the color scheme of the theme. Thus, a value of '1' will return the "Dark" color from the theme, '2' returns the "Light" color, '3' returns the "Accent 1" color, etc.

If the THEMEVAL function receives two arguments, it retrieves the value from the theme definition passed in as the first argument. However, if the document has No Theme applied to it, then the THEMEVAL function uses the value specified as the second argument.

Possible arguments for the "theme_value" parameter

Value Description
"Dark"
Retrieves Dark RGB color from the theme definition.
"Light"
Retrieves Light RGB color from the theme definition.
"BackgroundColor"
Retrieves Background RGB color from the theme definition.
"AccentColor"
Retrieves Accent1 RGB color from the theme definition.
"AccentColor2"
Retrieves Accent2 RGB color from the theme definition.
"AccentColor3"
Retrieves Accent3 RGB color from the theme definition.
"AccentColor4"
Retrieves Accent4 RGB color from the theme definition.
"AccentColor5"
Retrieves Accent5 RGB color from the theme definition.
"AccentColor6"
Retrieves Accent6 RGB color from the theme definition.
"LinePattern"
Retrieves LinePattern cell value from the theme definition.
"LineWeight"
Retrieves LineWeight cell value from the theme definition.
"LineColor"
Retrieves LineColor cell value from the theme definition.
"LineCap"
Retrieves LineCap cell value from the theme definition.
"LineBegin"
Retrieves BeginArrow cell value from the theme definition.
"LineEnd"
Retrieves EndArrow cell value from the theme definition.
"LineColorTrans"
Retrieves LineColorTrans cell value from the theme definition.
"LineCompoundtype"
Retrieves CompoundType cell value from the theme definition.
"LineBegin"
Retrieves BeginArrow cell value from the theme definition.
"LineEnd"
Retrieves EndArrow cell value from the theme definition.
"LineBeginSize"
Retrieves BeginArrowSize cell value from the theme definition.
"LineEndSize"
Retrieves EndArrowSize cell value from the theme definition.
"LineRounding"
Retrieves Rounding cell value from the theme definition.
"ConnectorColor"
Retrieves LineColor cell value from the theme definition.
"ConnectorPattern"
Retrieves LinePattern cell value from the theme definition.
"ConnectorWeight"
Retrieves LineWeight cell value from the theme definition.
"ConnectorTransparency"
Retrieves LineColorTrans cell value from the theme definition.
"ConnectorRounding"
Retrieves Rounding cell value from the theme definition.
"ConnectorBegin"
Retrieves BeginArrow cell value from the theme definition.
"ConnectorEnd"
Retrieves EndArrow cell value from the theme definition.
"ConnectorBeginSize"
Retrieves BeginArrowSize cell value from the theme definition.
"ConnectorEndSize"
Retrieves EndArrowSize cell value from the theme definition.
"FillColor"
Retrieves FillForegnd cell value from the theme definition.
"FillColor2"
Retrieves FillBkgnd cell value from the theme definition.
"FillTransparency"
Retrieves FillForegndTrans cell value from the theme definition.
"FillPattern"
Retrieves FillPattern cell value from the theme definition.
"LineGradientEnabled"
Retrieves LineGradientEnabled cell value from the theme definition.
"LineGradientDir"
Retrieves LineGradientDir cell value from the theme definition.
"LineGradientAngle"
Retrieves LineGradientAngle cell value from the theme definition.
"FillGradientEnabled"
Retrieves FillGradientEnabled cell value from the theme definition.
"FillGradientDir"
Retrieves FillGradientDir cell value from the theme definition.
"FillGradientAngle"
Retrieves FillGradientAngle cell value from the theme definition.
"RotateGradientWithShape"
Retrieves RotateGradientWithShape cell value from the theme definition.
"UseGroupGradient"
Retrieves UseGroupGradient cell value from the theme definition.
"ShadowType"
Retrieves ShapeShdwType cell value from the theme definition.
"ShadowColor"
Retrieves ShdwColor cell value from the theme definition.
"ShadowTransparency"
Retrieves ShdwColorTrans cell value from the theme definition.
"ShadowMagnification"
Retrieves ShapeShdwScaleFactor cell value from the theme definition.
"ShadowBlur"
Retrieves ShapeShdwBlur cell value from the theme definition.
"ShadowXOffset"
Retrieves ShapeShdwOffsetX cell value from the theme definition.
"ShadowYOffset"
Retrieves ShapeShdwOffsetY cell value from the theme definition.
"ShadowDirection"
Retrieves ShapeShdwObliqueAngle cell value from the theme definition.
"ShadowPattern"
Retrieves ShdwPattern cell value from the theme definition.
"BevelTopType"
Retrieves BevelTopType cell value from the theme definition.
"BevelTopWidth"
Retrieves BevelTopWidth cell value from the theme definition.
"BevelTopHeight"
Retrieves BevelTopHeight cell value from the theme definition.
"BevelMaterial"
Retrieves BevelMaterialType cell value from the theme definition.
"BevelLighting"
Retrieves BevelLightingType cell value from the theme definition.
"BevelLightingAngle"
Retrieves BevelLightingAngle cell value from the theme definition.
"BevelContourColor"
Retrieves BevelContourColor cell value from the theme definition.
"BevelContourSize"
Retrieves BevelContourSize cell value from the theme definition.
"ReflectionBlur"
Retrieves ReflectionBlur cell value from the theme definition.
"ReflectionDist"
Retrieves ReflectionDist cell value from the theme definition.
"ReflectionSize"
Retrieves ReflectionSize cell value from the theme definition.
"ReflectionTrans"
Retrieves ReflectionTrans cell value from the theme definition.
"SoftEdgesSize"
Retrieves SoftEdgesSize cell value from the theme definition.
"GlowSize"
Retrieves GlowSize cell value from the theme definition.
"GlowColor"
Retrieves GlowColor cell value from the theme definition.
"GlowTransparency"
Retrieves GlowColorTrans cell value from the theme definition.
"SketchAmount"
Retrieves SketchAmount cell value from the theme definition.
"SketchEnabled"
Retrieves SketchEnabled cell value from the theme definition.
"SketchFillChange"
Retrieves SketchFillChange cell value from the theme definition.
"SketchLineChange"
Retrieves SketchLineChange cell value from the theme definition.
"SketchLineWeight"
Retrieves SketchLineWeight cell value from the theme definition.
"LatinFont"
Retrieves Font cell value from the theme definition.
"TextColor"
Retrieves Color cell value from the theme definition.
"TextStyle"
Retrieves the Character.Style cell value from the theme definition.
"ComplexFont"
Retrieves ComplexScriptFont cell value from the theme definition.
"AsianFont"
Retrieves AsianFont cell value from the theme definition.
"FillStop[x]Color"
Retrieves Color cell value in row x from the theme definition.
"FillStop[x]Transparency"
Retrieves ColorTrans cell value in row x from the theme definition.
"FillStop[x]Position"
Retrieves Position cell value in row x from the theme definition.
"LineStop[x]Color"
Retrieves Color cell value in row x from the theme definition.
"LineStop[x]Transparency"
Retrieves ColorTrans cell value in row x from the theme definition.
"LineStop[x]Position"
Retrieves Position cell value in row x from the theme definition.

Example

THEMEVAL("5")

Returns the "Accent 3" color from the theme definition.

THEMEVAL("LineWeight", "0.7 pt.")

Returns the value of the "LineWeight" cell from the theme definition. If the shape containing this function has No Theme applied to it, the function returns '0.7 pt.'.