XMLNamespaces.Add (Word)

Returns an XMLNamespace object that represents a schema that is added to the Schema Library and made available to users in Microsoft Word.

Syntax : expression.Add (Path, NamespaceURI, Alias, InstallForAllUsers)

Sub AddSchema() 
 Dim objSchema As XMLNamespace 
 
 Set objSchema = Application.XMLNamespaces _ 
 .Add ("c:\schemas\simplesample.xsd") 
 
 objSchema.AttachToDocument ActiveDocument 
End Sub

Arguments

The following argument is required

Path (String) - The path and file name of the schema. This may be a local file path, a network path, or an Internet address.

The following arguments are optional

NamespaceURI (String) - The namespace Uniform Resource Indicator as specified in the schema. The NamespaceURI parameter is case-sensitive and must be spelled exactly as specified in schema.

Alias (String) - The name of the schema as it appears on the Schemas tab in the Templates and Add-ins dialog box.

InstallForAllUsers (Boolean) - True if all users that log on to a computer can access and use the new schema. The default is False.