Working with Text in Documents
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. |
The topics in this section provide step-by-step procedures and code examples for using the object model of Microsoft Office Word to work with text in Visual Studio Tools for Office projects.
In some cases, the ways that you perform these tasks in application-level add-ins is different from the ways that you perform them in document-level customizations.
Task |
Procedure |
---|---|
Define ranges based on various criteria and select them. |
|
Get the characters that begin and end a range. |
|
Select a paragraph without including the paragraph mark, and move the text. |
|
Make a range larger or smaller. |
|
Move a range to a different location and size. |
|
Reduce a range or section to consist of only the insertion point. |
|
Insert text into a document. |
|
Format the text in a range. |
|
Add or replace text in a bookmark. |
|
Find specific text by using a selection or a range. |
|
Find specific text and replace it. |
|
Specify how Word searches for text. |
|
Iterate through search results. |
|
Save the current selection and restore it after a search. |
|
Get the number of characters in a document, including hidden characters. |
|
Hide the text in a bookmark before printing a document. |
|
Add a comment to text. |