8.15. CommentFont Property

Description

Returns or sets the font for comment text.

Syntax

HRESULT get_Font(HANDLE handle, IFontDisp** pVal);
HRESULT put_Font(HANDLE handle, IFontDisp* val);

Remarks

The default font used to draw comment text is typeface of Arial, 8 points.

This property is used to retrieve/set the font used for comment text. To set/retrieve the font used for human readable text, use Font property.

In Visual Basic you cannot create a Font object using code like Dim X As New Font. If you want to create a Font object, you can use the StdFont object, as in the code below:

Dim X As New StdFont
X.Bold = True
X.Name = "Arial"
Dim rc As Long
rc = put_CommentFont(handle, X)