This documentation is archived and is not being maintained.

removeImport Method

Office 2003

Removes the specified imported style sheet reference from a STYLE element.

expression.removeImport(lIndex)

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

lIndex    Required Long. The ordinal position of the imported style sheet to remove from the collection of imported style sheets in the STYLE element.

Remarks

Use the addImport method to add an imported style sheet to the collection of imported style sheets for a STYLE element. Use the imports property to access the collection of imported style sheets for a STYLE element.

Example

The following example removes the first imported style sheet from the first STYLE element in the active document if there is at least one imported style sheet referenced.

    Dim objStyle As FPHTMLStyleSheet
Set objStyle = ActiveDocument.styleSheets.Item(0)

If objStyle.imports.Length <> 0 Then
    objStyle.removeImport (0)
End If
  




Show: