Some additional members of the Document object include:
Activates the document, thus making it the active document. For instance, to activate a document named MyLetter, execute the code:
Returns a Template object that represents the template that is currently attached to the document. By setting this property, you can attach a new template to the document. For instance, the following code attaches the template FaxDocs to the current document:
ActiveDocument.AttachedTemplate = "FaxDocs.dot"
This method returns information about the document. It syntax is:
Statistic is one of the following constants:
Enum WdStatistic wdStatisticWords = 0 wdStatisticLines = 1 wdStatisticPages = 2 wdStatisticCharacters = 3 wdStatisticParagraphs = 4 wdStatisticCharactersWithSpaces = 5 End Enum
IncludeFootnotesAndEndnotes is set to True to include footnotes and endnotes when computing the requested information. The default value of this parameter is False.
Incidentally, Word can supply more statistics about a document through the DocumentStatistics dialog box. (I explain how to access this information at the end of Chapter 19, Built-in Dialog Objects.)
This useful property returns a Range object that represents the main document story. (I show it ...