Share via


Document.HeaderFooterColor Property

Visio Automation Reference

Specifies the color of the header and footer text. Read/write.

Version Information
 Version Added:  Visio 2002

Syntax

expression.HeaderFooterColor

expression   A variable that represents a Document object.

Return Value
OLE_COLOR

Remarks

Valid values for OLE_COLOR within Microsoft Office Visio can be one of the following:

  • &H00bbggrr, where bb is the blue value between 0 and 0xFF (255), gg the green value, and rr the red value.
  • &H800000xx, where xx is a valid GetSysColor index.

For details about the GetSysColor function, search for "GetSysColor" in the Microsoft Platform SDK on MSDN, the Microsoft Developer Network.

The OLE_COLOR data type is used for properties that return colors. When a property is declared as OLE_COLOR, the Properties window will display a color-picker dialog box that allows the user to select the color for the property visually, rather than having to remember the numeric equivalent.

You can also set this value in the Color box in the Choose Font dialog box (on the View menu, click Header and Footer, and then click Choose Font).

Example

The following macro shows how to assign the color blue to text in the header and footer.

Visual Basic for Applications
  
Sub HeaderFooterColor_Example()
 
    'Set color of the header of this 
    'document to blue. 
    ThisDocument.HeaderFooterColor = &H00FF0000 

End Sub

See Also