返回 IFPStyleState 对象,该对象代表当前文档的样式状态。
expression.currentStyleState
expression 必选。返回 DispFPHTMLDocument 对象的表达式。
下列示例返回当前文档的样式状态。当前样式状态的显示类型会显示给用户。
Sub StyleState()
'References the style state of the current document
    Dim objApp As FrontPage.Application
    Dim objDoc As DispFPHTMLDocument
    Dim objStyleState As IFPStyleState
    Set objApp = FrontPage.Application
    Set objDoc = objApp.ActiveDocument
    'Create a reference to the IFPStyleState object.
    Set objStyleState = objDoc.currentStyleState
    MsgBox "The display type of the current style state is " & _
            objStyleState.Display
End Sub