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
The Newly Created Templates
Each new template produces a different document, even
though they are exactly the same except for their names. The
AutoNew macro runs every time the user goes to Office but-
ton | New | Basic Templates and chooses one of them.
Remember that the AutoOpen macro prohibited these new
templates from being opened. The original template, however,
contained an AutoNew macro that has been copied to each of
the three new templates. This macro controls which UserForm
will be displayed. The work of creating the document is left to
the UserForm. The AutoNew code is seen below:
Sub AutoNew()
' Turned off ScreenUpdating to save time and prevent ...
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