StyleSheets.Add Method
Returns a StyleSheet object that represents a new style sheet added to a Web document.
Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)
Syntax
'Declaration
Function Add ( _
FileName As String, _
LinkType As WdStyleSheetLinkType, _
Title As String, _
Precedence As WdStyleSheetPrecedence _
) As StyleSheet
'Usage
Dim instance As StyleSheets
Dim FileName As String
Dim LinkType As WdStyleSheetLinkType
Dim Title As String
Dim Precedence As WdStyleSheetPrecedence
Dim returnValue As StyleSheet
returnValue = instance.Add(FileName, LinkType, _
Title, Precedence)
StyleSheet Add(
string FileName,
WdStyleSheetLinkType LinkType,
string Title,
WdStyleSheetPrecedence Precedence
)
Parameters
- FileName
Type: System.String
Required String. The path and file name of the cascading style sheet.
- LinkType
Type: Microsoft.Office.Interop.Word.WdStyleSheetLinkType
Required WdStyleSheetLinkType. Indicates whether the style sheet should be added as a link or imported into the Web document.
Can be one of the following constants:
wdStyleSheetLinkTypeImported
wdStyleSheetLinkTypeLinked default
- Title
Type: System.String
Required String. The name of the style sheet.
- Precedence
Type: Microsoft.Office.Interop.Word.WdStyleSheetPrecedence
Required WdStyleSheetPrecedence. Indicates the level of importance compared to other cascading style sheets attached to the Web document.
Can be one of the following constants:
wdStyleSheetPrecedenceHigher
wdStyleSheetPrecedenceHighest default
wdStyleSheetPrecedenceLower
wdStyleSheetPrecedenceLowest
Return Value
Type: Microsoft.Office.Interop.Word.StyleSheet