Access.2007.VBA.Bibl..

(John Hannent) #1
Dim intMod As Integer
Dim lngCount As Long
Dim lngSkip As Long
Dim doc as Word.Document

strLongDate = Format(Date, “mmmm d, yyyy”)
strShortDate = Format(Date, “m-d-yyyy”)
strDocsPath = GetContactsDocsPath()
Debug.Print “Docs path: “ & strDocsPath

Open a new document based on the selected labels template:

Set appWord = GetObject(Class:=”Word.Application”)
Set doc = appWord.Documents.Add(strWordTemplate)

FIGURE 6.22

A Contact list filled with data from Access, showing new Word 2007 formatting features.


Working with Word Documents and Templates 6

Free download pdf