i added two custom text fields to my email. I want on Application_ItemSend to stamp the values of these fields (also with the subject) in the body of my email.
I have it working for the subject field (see code below) but i cant get it working for the two custom fields! I have tested with Mileage field and that works as well but how do i get the values of the two custom fields in there?
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim strStamp As String
On Error Resume Next
Set objOL = Application
Set objItem = objOL.ActiveInspector.CurrentItem
If Not objItem Is Nothing Then
Set objNS = objOL.Session
strStamp = " [SUBJECT] " & objItem.Subject & " [KLANT] " & objItem.Mileage
objItem.Body = objItem.Body & vbCrLf & strStamp
End If
Set objOL = Nothing
Set objItem = Nothing
Set objMileage = Nothing
End Sub
Thanks for all the help in advance
Marchel
I have it working for the subject field (see code below) but i cant get it working for the two custom fields! I have tested with Mileage field and that works as well but how do i get the values of the two custom fields in there?
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim strStamp As String
On Error Resume Next
Set objOL = Application
Set objItem = objOL.ActiveInspector.CurrentItem
If Not objItem Is Nothing Then
Set objNS = objOL.Session
strStamp = " [SUBJECT] " & objItem.Subject & " [KLANT] " & objItem.Mileage
objItem.Body = objItem.Body & vbCrLf & strStamp
End If
Set objOL = Nothing
Set objItem = Nothing
Set objMileage = Nothing
End Sub
Thanks for all the help in advance
Marchel