Write final line.strText = “End of File”
txt.WriteBlankLines Lines:=1
txt.WriteLine Text:=strTextCase 3VBOpen text file for writing information about export progress.Open strFile For Output As #1
strText = “Information on progress creating “ _
& “Outlook mail messages”
Print #1, strText
Print #1,
Print #1,blnSomeSkipped = FalseFor Each varItem In lst.ItemsSelectedGet Contact ID and name for reference.lngContactID = Nz(lst.Column(0, varItem))
Debug.Print “Contact ID: “ & lngContactID
strFullName = Nz(lst.Column(1, varItem))Check for email address.strEMailRecipient = Nz(lst.Column(2, varItem))
strTest = strEMailRecipient
Debug.Print “Email address: “ & strTest
If strTest = “” Then
blnSomeSkipped = True
strText = “Contact No. “ & lngContactID _
& “ (“ & strFullName _
& “) skipped; no email address”
Print #1,
Print #1, strText
GoTo NextContactVB
End IfCheck for company name.strCompanyName = Nz(lst.Column(3, varItem))
strTest = strCompanyName
Debug.Print “Company name: “ & strTestPart II Writing VBA Code to Exchange Data between Office Components