Access.2007.VBA.Bibl..
FIGURE 6.5 Examining the Word MailMerge object in the Object Browser. Creating a New, Blank Word Document ...................... ...
ErrorHandler: If Err = 429 Then ‘Word is not running; open Word with CreateObject Set appWord = CreateObject(Class:=”Word.Applic ...
FIGURE 6.7 Selecting a folder as the Contact Documents folder. The NewDocFromTemplatefunction listed next creates a new document ...
Must declare this variable as Object because declaring it as Word.CustomProperties doesn’t work: Dim prps As Object Must declare ...
some fields lack data. I also create a separate ZipCode field for use in creating U.S. PostNet bar codes on envelopes or labels. ...
Choosing a Method for Merging Access Data to Word ............................................ The NewDocFromTemplateprocedure l ...
TABLE 6.1 (continued) Method Advantages Disadvantages TypeText No advance preparation of any kind Suitable only for very simple ...
FIGURE 6.8 Word templates and documents in Word 2002/2003 and Word 2007 formats. FIGURE 6.9 The Properties selection on the new ...
The Properties command on the Office menu opens a new feature of Word 2007, the Document Information Panel (see Figure 6.10), wh ...
Click the Custom tab to see the custom document properties; these are the ones that are most commonly filled with data from Acce ...
Part II Writing VBA Code to Exchange Data between Office Components n Numeric fields should also be avoided, both because you ca ...
Working with Word Documents and Templates 6 FIGURE 6.14 Opening the old Paragraph dialog box from the new Ribbon. FIGURE 6.15 A ...
Part II Writing VBA Code to Exchange Data between Office Components Using Word Field Switches to Format Text Data in DocProperty ...
Working with Word Documents and Templates 6 Inserting a U.S. PostNet BarCode field on a Word document. When placing DocProperty ...
The cmdWord_Click()event procedure first saves information to variables, for use later in the code, then checks that the templat ...
strLongDate = Format(Date, “mmmm d, yyyy”) strShortDate = Format(Date, “m-d-yyyy”) strSaveName = “Letter to “ & strContactNa ...
Check for a previously saved letter in the documents folder, and append an incremented number to the save name if one is found: ...
Else MsgBox “Error No: “ & Err.Number _ & “; Description: “ & Err.Description Resume ErrorHandlerExit End If End Sub ...
If you don’t want to create multiple documents, you can eliminate the Do...Loopstatement and overwrite an existing file with the ...
FIGURE 6.18 A combo box for selecting a Word template for merging data from Access. The procedure then calls one of four procedu ...
«
4
5
6
7
8
9
10
11
12
13
»
Free download pdf