Groundrush
Registered User.
- Local time
- Today, 19:39
- Joined
- Apr 14, 2002
- Messages
- 1,376
Just a quickie for the experts in vb.
I am using this interesting bit of code that I found that emails data from access and it works great.
I am now trying to work out how to make the data appear as BOLD text in the email.
Not all the text just the data returned from Access
Here is part of the code I am using
thanks in advance
strEMailMsg = " Joanne has requested the following New Property/Recharge Code to be entered into Concept:." & Chr(10) & Chr(10) _
& "Request Dated:" & rst![DateOfRequest] & Chr(10) & Chr(10) _
& "New Property Name: " & rst![PropertyName] & Chr(10) & Chr(10) _
& "Address 1:" & rst![Address1] & Chr(10) & Chr(10) _
& "Address 2:" & rst![Address2] & Chr(10) & Chr(10) _
& "Address 3:" & rst![Address3] & Chr(10) & Chr(10) _
& "Address 4:" & rst![Address4] & Chr(10) & Chr(10) _
& "Post Code:" & rst![PostCode] & Chr(10) & Chr(10) _
& "Assign to Contract No:" & rst![ContractNo] & Chr(10) & Chr(10) _
& "Contract Name:" & rst![ContractName] & Chr(10) & Chr(10) _
& "Code No:" & rst![CodeNo] & Chr(10) & Chr(10) _
& "Recharge Code:" & rst![RechargeCode] & Chr(10) & Chr(10) _
& "Requested By:" & rst![RequestedBy] & Chr(10) & Chr(10) _
& "Further Notes:" & rst![Notes] & Chr(10) & Chr(10)
'EMAIL USER DETAILS & ATT REPORT
DoCmd.SendObject , , acFormatRTF, strEmailAddress, _
, , strSubject, strEMailMsg, False, False
rst.MoveNext
Loop
rst.Close
Set rst = Nothing
dbs.Close
Set dbs = Nothing
'Run update to update the sent mail check box
DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE tblNewProperty SET tblNewProperty.Mailsent = -1 WHERE (((tblNewProperty.Mailsent)=0))"
DoCmd.SetWarnings True
MsgBox "The email has been sent", vbInformation, "Thank You"
End If
End Sub
I am using this interesting bit of code that I found that emails data from access and it works great.
I am now trying to work out how to make the data appear as BOLD text in the email.
Not all the text just the data returned from Access
Here is part of the code I am using
thanks in advance
strEMailMsg = " Joanne has requested the following New Property/Recharge Code to be entered into Concept:." & Chr(10) & Chr(10) _
& "Request Dated:" & rst![DateOfRequest] & Chr(10) & Chr(10) _
& "New Property Name: " & rst![PropertyName] & Chr(10) & Chr(10) _
& "Address 1:" & rst![Address1] & Chr(10) & Chr(10) _
& "Address 2:" & rst![Address2] & Chr(10) & Chr(10) _
& "Address 3:" & rst![Address3] & Chr(10) & Chr(10) _
& "Address 4:" & rst![Address4] & Chr(10) & Chr(10) _
& "Post Code:" & rst![PostCode] & Chr(10) & Chr(10) _
& "Assign to Contract No:" & rst![ContractNo] & Chr(10) & Chr(10) _
& "Contract Name:" & rst![ContractName] & Chr(10) & Chr(10) _
& "Code No:" & rst![CodeNo] & Chr(10) & Chr(10) _
& "Recharge Code:" & rst![RechargeCode] & Chr(10) & Chr(10) _
& "Requested By:" & rst![RequestedBy] & Chr(10) & Chr(10) _
& "Further Notes:" & rst![Notes] & Chr(10) & Chr(10)
'EMAIL USER DETAILS & ATT REPORT
DoCmd.SendObject , , acFormatRTF, strEmailAddress, _
, , strSubject, strEMailMsg, False, False
rst.MoveNext
Loop
rst.Close
Set rst = Nothing
dbs.Close
Set dbs = Nothing
'Run update to update the sent mail check box
DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE tblNewProperty SET tblNewProperty.Mailsent = -1 WHERE (((tblNewProperty.Mailsent)=0))"
DoCmd.SetWarnings True
MsgBox "The email has been sent", vbInformation, "Thank You"
End If
End Sub
Last edited: