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
Private Sub cmdDocs_Click()
ActiveDocument.Range.Select
Selection.TypeText Text:="Note!"
Selection.Collapse wdCollapseEnd
Selection.TypeParagraph
Selection.TypeText Me.txtLanguage.Value
Protect
End
End Sub
Note: This example was very simple in the fact that the resultant
document incorporated only the text that was in the main text box.
If you incorporate this technique, you will probably want to use it in
conjunction with a template that incorporates Word fields to enter
the language into the document. This way you could keep the tem-
plate’s boilerplate language free from modification, and allow a
user to modify only the language that you give them access ...
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