Format related procedures in class ThreeDFormat (Word VBA)

This page presents procedures from class ThreeDFormat related to the theme Format: ContourColor, ContourWidth, ExtrusionColor, ExtrusionColorType, PresetThreeDFormat, SetThreeDFormat and Visible

ContourColor

Returns or sets a ColorFormat object that represents color of the contour of a shape.

Dim cftContourColor As ColorFormat
Set cftContourColor = Selection.Font.ThreeD.ContourColor

ContourWidth

Returns or sets a Single that represents the width of the contour of a shape.

Selection.Font.ThreeD.ContourWidth =

ExtrusionColor

Returns a ColorFormat object that represents the color of the shape's extrusion.

Dim docActive As Document 
Dim shapeNew As Shape 
 
Set docActive = ActiveDocument 
Set shapeNew = docActive.Shapes.AddShape(msoShapeOval, _ 
 90, 90, 90, 40) 
With shapeNew.ThreeD 
 .Visible = True 
 .Depth = 50 
 ' RGB value for purple 
 .ExtrusionColor.RGB = RGB(255, 100, 255) 
End With

ExtrusionColorType

Returns or sets a value that indicates whether the extrusion color is based on the extruded shape's fill (the front face of the extrusion) and automatically changes when the shape's fill changes, or whether the extrusion color is independent of the shape's fill.

Dim docActive As Document 
 
Set docActive = ActiveDocument 
 
With docActive.Shapes(1).ThreeD 
 If .ExtrusionColorType = msoExtrusionColorAutomatic Then 
 .ExtrusionColor.RGB = RGB(240, 235, 16) 
 End If 
End With

PresetThreeDFormat

Returns the preset extrusion format.

Each preset extrusion format contains a set of preset values for the various properties of the extrusion. If the extrusion has a custom format rather than a preset format, this property returns msoPresetThreeDFormatMixed. The values for this property correspond to the options (numbered from left to right, top to bottom) displayed when you click the 3D button on the Drawing toolbar. Use the SetThreeDFormat method to set the preset extrusion format.

Set myDocument = ActiveDocument 
With myDocument.Shapes(1).ThreeD 
 If .PresetThreeDFormat = msoPresetThreeDFormatMixed Then 
 .SetThreeDFormat msoThreeD12 
 End If 
End With

SetThreeDFormat

Sets the preset extrusion format.

Each preset extrusion format contains a set of preset values for the various properties of the extrusion. This method sets the PresetThreeDFormat property to the format specified by the PresetThreeDFormat argument.

Syntax : expression.SetThreeDFormat (PresetThreeDFormat)

PresetThreeDFormat: Specifies a preset extrusion format that corresponds to one of the options (numbered from left to right, top to bottom) displayed when you click the 3D button on the Drawing toolbar.

With ActiveDocument.Shapes.AddShape(msoShapeOval, _ 
 30, 30, 50, 25).ThreeD 
 .Visible = True 
 .SetThreeDFormat msoThreeD12 
End With

Visible

True if the specified object, or the formatting applied to it, is visible.

Some methods and properties may be unavailable if the Visible property is False.

Selection.Font.ThreeD.Visible =