HeaderRight Property [Visio 2003 SDK Documentation]
Gets or sets the text string that appears in the right portion of a document's header.
strRet = object**.HeaderRight**
object**.HeaderRight** = stringExpression
strRet String. The text in the right portion of the header.
object Required. An expression that returns a Document object.
stringExpression Required String. New text for the right portion of the header.
Version added
2002
Remarks
You can also set this value in the Right box under Header in the Header and Footer dialog box (View menu).
Both strRet and strExpression can contain escape codes that represent data. These escape codes can be concatenated with other text. For a list of valid escape codes you can use with the HeaderRight property, see the FooterLeft property.
Example
The following macro shows how to place a string containing the current date into the right portion of a document's header. After you run this macro, if the date is May 4, 2004, the right portion of the header contains "The date is Thursday, May 4, 2004".
Sub HeaderRight_Example()
Dim strHeader as String
'Build header string.
strHeader = "The date is " & "&D"
'Set header of the current document.
ThisDocument.HeaderRight = strHeader
End Sub
Applies to | Document object
See Also | FooterCenter property | FooterLeft property | FooterMargin property | FooterRight property | HeaderCenter property | HeaderFooterColor property | HeaderFooterFont property | HeaderLeft property | HeaderMargin property