XMLSchemaReference.NamespaceURI Property

Word Developer Reference

Returns a String that represents the Uniform Resource Identifier (URI) of the schema namespace for the specified object. Read-only.

Syntax

expression.NamespaceURI

expression   An expression that returns a XMLSchemaReference object.

Remarks

If you are authoring XML schemas for use with Microsoft Word, it is highly recommended that you specify the targetNamespace setting in the schema.

Example

The following example reloads the SimpleSample schema or, if the schema is not attached to the active document, attaches it.

Bb243296.vs_note(en-us,office.12).gif  Note
The SimpleSample schema is included in the Smart Document Software Development Kit (SDK). For more information, refer to the Smart Document SDK on the Microsoft Developer Network (MSDN) Web site.
Visual Basic for Applications
  If ActiveDocument.XMLSchemaReferences.Item(1) _
        .NamespaceURI <> "SimpleSample" Then
Application.XMLNamespaces.Item("SimpleSample") _
    .AttachToDocument (ActiveDocument)

End If

See Also