FIGURE 6.20
A Word document with Access data displayed in bookmarks.
Check that at least one contact has been selected:
Set lst = Me![lstSelectContacts]
If lst.ItemsSelected.Count = 0 Then
MsgBox “Please select at least one contact”
lst.SetFocus
GoTo ErrorHandlerExit
End If
intColumns = lst.ColumnCount
intRows = lst.ItemsSelected.Count
For Each varItem In lst.ItemsSelected
Part II Writing VBA Code to Exchange Data between Office Components