
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 ...