Updated: November 2007
Applies to
|
|---|
The information in this topic applies only to the specified Visual Studio Tools for Office projects and versions of Microsoft Office.
Project type Microsoft Office version
For more information, see Features Available by Application and Project Type.
|
You can use the Range object to format text in a Microsoft Office Word document.
The following example selects the first paragraph in the document and changes the font size, the font name, and the alignment. It then selects the range and displays a message box to pause before executing the next section of code. The next section calls the Undo method of the Microsoft.Office.Tools.Word..::.Document host item (for a document-level customization) or the Document class (for an application-level add-in) three times. It applies the Normal Indent style and displays a message box to pause the code. Then the code calls the Undo method once, and displays a message box.

Document-Level Customization Example
To format text using a document-level customization

Application-Level Add-in Example
To format text using an application-level add-in

See Also
Tasks
Reference
SizeBi()()()