Class ViewFont (Outlook VBA)
The class ViewFont represents the font used when formatting text in various portions of a view. To use a ViewFont class variable it first needs to be instantiated, for example
Dim vft as ViewFont
Set vft = Session.CreateSharingItem.Move.Views(1).HeadingsFont
Bold
Returns or sets a Boolean value that indicates if the font is bold in the ViewFont object.
Session.CreateSharingItem.Move.Views(1).HeadingsFont.Bold = True
Class
Returns an OlObjectClass constant indicating the object's class. Here you can find possible values for
Dim oocsClass As OlObjectClass
oocsClass = Session.CreateSharingItem.Move.Views(1).HeadingsFont.Class
Color
Returns or sets an OlColor constant that indicates the color of the font in the ViewFont object. Here you can find possible values for
Session.CreateSharingItem.Move.Views(1).HeadingsFont.Color = olAutoColor
ExtendedColor
Returns or sets an OlCategoryColor constant as the font color of the view. Read/write Here you can find possible values for
You can use the Color property or the ExtendedColor property to set the font color in a view. For a calendar view in particular, you must use the ExtendedColor property to set the font color.
Session.CreateSharingItem.Move.Views(1).HeadingsFont.ExtendedColor = olCategoryColorBlack
Italic
Returns or sets a Boolean value that indicates if the font is italicized in the ViewFont object.
Session.CreateSharingItem.Move.Views(1).HeadingsFont.Italic = True
Name
Returns or sets a String value that represents the display name for the object.
Session.CreateSharingItem.Move.Views(1).HeadingsFont.Name =
Session
Returns the NameSpace object for the current session.
The Session property and the GetNamespace method can be used interchangeably to obtain the NameSpace object for the current session. Both members serve the same purpose. For example, the following statements perform the same function:
Size
Returns or sets a Long value that represents the size (in points) of the font in the view.
This property can be set to a value between 1 and 127. If this property is set to a value less than 1, the property is set to 1. If this property is set to a value greater than 127, the property is set to 127. The default value for this property is determined by the operating system.
Session.CreateSharingItem.Move.Views(1).HeadingsFont.Size =
Strikethrough
Returns or sets a Boolean value that indicates if the font is struck through with a horizontal line in the ViewFont object.
Session.CreateSharingItem.Move.Views(1).HeadingsFont.Strikethrough = True
Underline
Returns or sets a Boolean value that indicates if the font is underlined in the ViewFont object.
Session.CreateSharingItem.Move.Views(1).HeadingsFont.Underline = True