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
sIniFile, "Company", "Zip")
.Variables("sClosing").Value = _
System.PrivateProfileString( _
sIniFile, "Personal", "Closing")
End With
' Unload the running UserForm.
Unload Me
' Update the Docvariable fields and unlink them.
With ActiveDocument
.Fields.Update
.Fields.Unlink
End With
' Delete sections of the template that won't be used.
ActiveDocument.Sections(1).Range.Delete
ActiveDocument.Sections(1).Range.Delete
ActiveDocument.Sections(2).Range.Delete
' Turn screen updating back on.
Application.ScreenUpdating = True
End Sub
Listing 9-6: The frmMemo UserForm
Option Explicit
Dim sIniFile As String
' Keep the user from seeing the text boxes unless the user
' clicks ...
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