Templates Templates Templates Interface

Definition

A collection of Template objects that represent all the templates that are currently available.

public interface class Templates : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("000209A2-0000-0000-C000-000000000046")]
public interface Templates : System.Collections.IEnumerable
Public Interface Templates
Implements IEnumerable
Attributes
Implements

Remarks

This collection includes open templates, templates attached to open documents, and global templates loaded in the Templates and Add-ins dialog box (Tools menu).

Use the Templates property to return the Templates collection.

The Add method isn't available for the Templates collection. Instead, you can add a template to the Templates collection by doing any of the following:

Use Templates(index), where index is the template name or the index number, to return a single Template object The index number represents the position of the template in the Templates collection.

Use the NormalTemplate property to return a template object that refers to the Normal template. Use the AttachedTemplate property to return the template attached to the specified document.

Use the DefaultFilePath[WdDefaultFilePath] property to determine the location of user or workgroup templates (that is, the folder where you want to store these templates).

Properties

Application Application Application

Returns a Application object that represents the Microsoft Word application.

Count Count Count

Returns the number of items in the specified collection.

Creator Creator Creator

Returns a 32-bit integer that indicates the application in which the specified object was created.

Item[Object] Item[Object] Item[Object]

Returns an individual object in a collection.

Parent Parent Parent

Returns an object that represents the parent object of the specified object.

Methods

GetEnumerator() GetEnumerator() GetEnumerator()
LoadBuildingBlocks() LoadBuildingBlocks() LoadBuildingBlocks()

Loads the building blocks for all templates into Microsoft Office Word.

Applies to