P
peddie
Hi,
Anyone could please help with my code.
I customised an outlook form with following code. The outlook client
could see the data when viewed with outlook internally. A lot of our
users use Blackberry. So I wrote this code so that it also sends a
plain text version of the email so Blackberry users could see it.
The codes only work if I open the form in design mode and choose 'Run
this form'. Once saved and come back to use the form, the following
codes do not seem to be generated. Any suggestions please?
Function Item_Send()
Dim strMessageType
Dim strTimeOfCall
Dim strCompanyName
Dim strContactName
Dim strContactNumber
Dim strDetail
set strMessageType = Item.UserProperties.Find("Message Type")
set strTimeOfCall = Item.UserProperties.Find("Time of call")
set strCompanyName = Item.UserProperties.Find("CustomerBusinessName")
set strContactName = Item.UserProperties.Find("Contact Name")
set strContactNumber = Item.UserProperties.Find("Contact Number")
set strDetail = Item.UserProperties.Find("Detail")
Item.Body = "Time of call: " & Left(strTimeOfCall,5) & vbCrLf & vbCrLf
& _
"Contact Name: " & strContactName & vbCrLf & vbCrLf & _
"Contact Number: " & strContactNumber & vbCrLf & vbCrLf & _
"Company Name: " & strCompanyName & vbCrLf & vbCrLf & _
"Detail: " & strDetail
Item.Save
End Function
Anyone could please help with my code.
I customised an outlook form with following code. The outlook client
could see the data when viewed with outlook internally. A lot of our
users use Blackberry. So I wrote this code so that it also sends a
plain text version of the email so Blackberry users could see it.
The codes only work if I open the form in design mode and choose 'Run
this form'. Once saved and come back to use the form, the following
codes do not seem to be generated. Any suggestions please?
Function Item_Send()
Dim strMessageType
Dim strTimeOfCall
Dim strCompanyName
Dim strContactName
Dim strContactNumber
Dim strDetail
set strMessageType = Item.UserProperties.Find("Message Type")
set strTimeOfCall = Item.UserProperties.Find("Time of call")
set strCompanyName = Item.UserProperties.Find("CustomerBusinessName")
set strContactName = Item.UserProperties.Find("Contact Name")
set strContactNumber = Item.UserProperties.Find("Contact Number")
set strDetail = Item.UserProperties.Find("Detail")
Item.Body = "Time of call: " & Left(strTimeOfCall,5) & vbCrLf & vbCrLf
& _
"Contact Name: " & strContactName & vbCrLf & vbCrLf & _
"Contact Number: " & strContactNumber & vbCrLf & vbCrLf & _
"Company Name: " & strCompanyName & vbCrLf & vbCrLf & _
"Detail: " & strDetail
Item.Save
End Function