HeaderFooterFont Property [Visio 2003 SDK Documentation]
Specifies the font used for the header and footer text.
fontRet = object**.HeaderFooterFont**
object**.HeaderFooterFont** = fontVal
fontRet An IFontDisp object that represents the font of the header and footer text.
object Required. An expression that returns a Document object.
fontVal Required IFontDisp. An IFontDisp object representing the new font for the header and footer text.
Version added
2002
Remarks
COM provides a standard implementation of a font object with the IFontDisp interface on top of the underlying system font support. The IFontDisp interface exposes a font object's properties and is implemented in the stdole type library as a StdFont object that can be created in Microsoft Visual Basic. The stdole type library is automatically referenced from all Visual Basic for Applications (VBA) projects in Microsoft Office Visio.
To get information about the StdFont object that supports the IFontDisp interface:
- On the Tools menu, point to Macros, and then click Visual Basic Editor.
- On the View menu, click Object Browser.
- In the Project/Library list, click stdole.
- Under Classes, examine the class named StdFont.
For details about the IFontDisp interface, see the Microsoft Platform SDK on MSDN, the Microsoft Developer Network.
Setting the HeaderFooterFont property is the equivalent of setting values in the Font box in the Choose Font dialog box (on the View menu, click Header and Footer, and then click Choose Font).
Example
The following sample code shows how to use the HeaderFooterFont property to get a reference to the current Font object and set the document's text font to non-bold Arial.
Public Sub HeaderFooterFont_Example()
Dim objStdFont As StdFont
Set objStdFont = ThisDocument.HeaderFooterFont
objStdFont.Name = "Arial"
objStdFont.Bold = False
Set ThisDocument.HeaderFooterFont = objStdFont
End Sub
Applies to | Document object
See Also | FooterCenter property | FooterLeft property | FooterMargin property | FooterRight property | HeaderCenter property | HeaderFooterColor property | HeaderLeft property | HeaderMargin property | HeaderRight property