Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Gets a StyleSheets object that represents the Web style sheets attached to the document.
Namespace: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
Syntax
'Declaration
Public ReadOnly Property StyleSheets As StyleSheets
public StyleSheets StyleSheets { get; }
Property Value
Type: Microsoft.Office.Interop.Word.StyleSheets
A StyleSheets object that represents the Web style sheets attached to the document.
Examples
The following code example adds a style sheet to the document. The code example assumes that a style sheet called WebSite.css exists at the root of the C directory. To use this example, run it from the ThisDocument class in a document-level project.
Private Sub DocumentStyleSheets()
Me.StyleSheets.Add("c:\WebSite.css", Microsoft.Office.Interop.Word. _
WdStyleSheetLinkType.wdStyleSheetLinkTypeLinked, "myStyleSheet", _
Word.WdStyleSheetPrecedence.wdStyleSheetPrecedenceHighest)
End Sub
private void DocumentStyleSheets()
{
this.StyleSheets.Add("c:\\WebSite.css", Microsoft.Office.
Interop.Word.WdStyleSheetLinkType.wdStyleSheetLinkTypeLinked,
"myStyleSheet", Word.WdStyleSheetPrecedence.
wdStyleSheetPrecedenceHighest);
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.