Skip to content

Latest commit

 

History

History
58 lines (33 loc) · 1.32 KB

Word.XMLNamespace.AttachToDocument.md

File metadata and controls

58 lines (33 loc) · 1.32 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
XMLNamespace.AttachToDocument method (Word)
vbawd10.chm2293860
vbawd10.chm2293860
Word.XMLNamespace.AttachToDocument
18af2ed2-2806-401a-4cca-9d8746f25082
06/08/2017
medium

XMLNamespace.AttachToDocument method (Word)

Attaches an XML schema to a document.

Syntax

expression. AttachToDocument( _Document_ )

expression An expression that represents a 'XMLNamespace' object.

Parameters

Name Required/Optional Data type Description
Document Required Document The document to which to attach the specified XML schema.

Example

The following example adds the SimpleSample schema to the Schema Library and then attaches it to the active document.

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.

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

See also

XMLNamespace Object

[!includeSupport and feedback]