Skip to Main Content
Word 2007 Document Automation with VBA and VSTO
book

Word 2007 Document Automation with VBA and VSTO

by Scott Driza
March 2009
Intermediate to advanced content levelIntermediate to advanced
617 pages
17h 24m
English
Jones & Bartlett Learning
Content preview from Word 2007 Document Automation with VBA and VSTO
Figure 17-4 shows the resultant message box when I searched
and replaced the word “the” in the current document.
The Range Object
The Range object often acts as a means to access other
objects. Although it may appear as though you are working
with properties of the Range object, you are really just using
Range to qualify a child object. A good example to illustrate
this is the Font object that can be accessed through the Range
object as shown here:
Application.ActiveDocument.Paragraphs(1).Range.Font
The Font object cannot be accessed directly from a Paragraph
object, and would result in a syntax error if this is attempted.
The following line of code produces ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Word 2003 Document Automation with VBA, XML, XSLT, and Smart Documents

Word 2003 Document Automation with VBA, XML, XSLT, and Smart Documents

Scott Driza

Publisher Resources

ISBN: 9781598220476