StyleSheetRule Object

SharePoint Designer Developer Reference

Represents an individual rule from a collection of cascading style sheet (CSS) rules.

Interfaces
This object implements the following interfaces

Remarks

Use the rules property to return a StyleSheetRulesCollection collection that represents a collection of all the cascading style sheet rules in an attached CSS. Use the Item method to return a StyleSheetRule object that accesses a specific CSS rule, referenced by ordinal number. The following example accesses the first rule in the collection of CSS rules for the first CSS attached to the active document.

Visual Basic for Applications
Dim objCSS As StyleSheet
Dim objRules As StyleSheetRulesCollection
Dim objRule As StyleSheetRule
Set objCSS = ActiveDocument.styleSheets(0)
Set objRules = objCSS.rules
Set objRule = objRules.Item(0)

See Also