Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

fontWeight Property

Office 2003

Sets or returns a String that represents the weight of the font for the specified object.

expression.fontWeight

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

The String value for the fontWeight property can be one of the following:

normal Font is normal. Default.
bold Font is bold.
bolder Font is heavier than regular bold.
lighter Font is lighter than normal.
100 Font is at least as light as the 200 weight.
200 Font is at least as bold as the 100 weight and at least as light as the 300 weight.
300 Font is at least as bold as the 200 weight and at least as light as the 400 weight.
400 Font is normal.
500 Font is at least as bold as the 400 weight and at least as light as the 600 weight.
600 Font is at least as bold as the 500 weight and at least as light as the 700 weight.
700 Font is bold.
800 Font is at least as bold as the 700 weight and at least as light as the 900 weight.
900 Font is at least as bold as the 800 weight.

Example

This example inserts a new paragraph containing the current user's name into the active document, and then formats the font characteristics.

    Sub FontFaceSource()
    Dim objPara As FPHTMLParaElement

    ActiveDocument.body.insertAdjacentHTML where:="beforeend", _
            HTML:="<p id=""username"">" & Application.UserName & "</p>"

    Set objPara = ActiveDocument.body.all.tags("p").Item("username")

    With objPara.Style
        .fontFamily = "Tahoma"
        .FONTSIZE = "40pt"
        .fontStyle = Italic
        .fontVariant = "small-caps"
        .fontWeight = "bold"
    End With
End Sub
  




Show:
© 2014 Microsoft