StyleSheets Property

Microsoft Word Visual Basic

object that represents the Web style sheets attached to a document.

expression.StyleSheets

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

Example

This example adds a style sheet to the active document and places it highest in the list of style sheets attached to the document. This example assumes that you have a style sheet document named "Website.css" located on your C: drive.

Sub Styshts()
    ThisDocument.StyleSheets.Add _
        FileName:="c:\WebSite.css", _
        Precedence:=wdStyleSheetPrecedenceHighest
End Sub