Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Gets or sets a Template that represents the template attached to the document.
Namespace: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
Syntax
'Declaration
Public Property AttachedTemplate As Object
public Object AttachedTemplate { get; set; }
Property Value
Type: System.Object
A Template that represents the template attached to the document.
Remarks
To set this property, specify either the name of the template or an expression that returns a Template.
Examples
The following code example displays a message that shows the name of the template that is attached to the document. To use this example, run it from the ThisDocument class in a document-level project.
Private Sub DocumentAttachedTemplate()
Dim attachedTemplate As Word.Template = CType(Me.AttachedTemplate, Word.Template)
MessageBox.Show(attachedTemplate.Name)
End Sub
private void DocumentAttachedTemplate()
{
Word.Template attachedTemplate = (Word.Template)this.AttachedTemplate;
MessageBox.Show(attachedTemplate.Name);
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.