AttachedTemplate Class

Attached Document Template.When the object is serialized out as xml, its qualified name is w:attachedTemplate.

Inheritance Hierarchy


Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)


Public Class AttachedTemplate _
    Inherits RelationshipType
Dim instance As AttachedTemplate
public class AttachedTemplate : RelationshipType


[ISO/IEC 29500-1 1st Edition] attachedTemplate (Attached Document Template)

This element specifies the location of a document template which shall be attached to the current WordprocessingML document if it is accessible and of a format supported by an application. Specifically, this element's val attribute shall contain the file path of the associated document template.

If this element is omitted, then the document shall not have an attached document template, and applications should use their default template in its place.

[Example: Consider a WordprocessingML document which is attached to a WordprocessingML template located on the local C drive within a file whose name is c:\template.dotx. This association is specified using the following WordprocessingML:

  <w:attachedTemplate r:id="rId1" />

The attachedTemplate element contains the ID of the relationship which references the associated template. end example]

Parent Elements

settings (§



id (Relationship to Part)

Namespace: .../officeDocument/2006/relationships

Specifies the relationship ID to a specified part.

The specified relationship shall match the relationship type required by the parent element:

  • for the contentPart element

  • for the footerReference element

  • for the headerReference element

  • for the embedBold, embedBoldItalic, embedItalic, or embedRegular elements

  • for the printerSettings element

  • for the longDesc or hyperlink element

[Example: Consider an XML element which has the following id attribute:

<… r:id="rId10" />

The markup specifies the associated relationship part with relationship ID rId1 contains the corresponding relationship information for the parent XML element. end example]

The possible values for this attribute are defined by the ST_RelationshipId simple type (§

[Note: The W3C XML Schema definition of this element’s content model (CT_Rel) is located in §A.1. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also


AttachedTemplate Members

DocumentFormat.OpenXml.Wordprocessing Namespace