Hiya,
i have this code currently that places information from my form into a new email message using an outlook express object:
Now my list box has 3 columns name email and grade. There is already code that grabs the email from the listbox which is :
so im thinking how do i do this for the grade which is the 3rd column and place it at the end of the body saying your grade is [variable containing grade]
something like :
and then putting that into here somewhere:
Not sure how it will fit though
If anyone could help me slot this in id be greatful
i have this code currently that places information from my form into a new email message using an outlook express object:
Code:
For Each varItem In lst.ItemsSelected
'Check for email address
strEMailRecipient = Nz(lst.Column(1, varItem))
Debug.Print "EMail address: " & strEMailRecipient
If strEMailRecipient = "" Then
GoTo NextContact
End If
'Create new mail message and send to contact
Set appOutlook = GetObject(, "Outlook.Application")
Set msg = appOutlook.CreateItem(olMailItem)
With msg
.To = strEMailRecipient
.Subject = strSubject
.Body = strBody
.Display
End With
Code:
'Check for email address
strEMailRecipient = Nz(lst.Column(1, varItem))
Debug.Print "EMail address: " & strEMailRecipient
If strEMailRecipient = "" Then
GoTo NextContact
something like :
Code:
strGrade = Nz(lst.Column(3, varItem))
If strGrade = "" Then
GoTo NextContact
Code:
.Body = strBody, strGrade
Not sure how it will fit though
If anyone could help me slot this in id be greatful
