G
Guest
I was wondering if anyone knew how to copy the first email adressee to
another specified field. For example in my "To:" Field there is a list of
email addresses the email should go to. And what i want to do is copy the
first email address to another custom textbox. Below is my code but I can't
seem to get it to work.
Function Item_Send()
Dim i
Dim objPage
Dim objControlSentTo
i = InStr(Item.To, ";")
If i = 0 Then
i = InStr(Item.To, ",")
If i > 0 Then
Set objPage = Item.GetInspector.ModifiedFormPages("Terminated Employee
Check List")
Set objControlSentTo = Item.GetInspector.ModifiedFormPages("Terminated
Employee Check List") _
..Controls("TextBox11")
While i <> 0
objControlSentTo = Mid(Item.To, i - 1)
i = 0
Wend
End If
End Function
another specified field. For example in my "To:" Field there is a list of
email addresses the email should go to. And what i want to do is copy the
first email address to another custom textbox. Below is my code but I can't
seem to get it to work.
Function Item_Send()
Dim i
Dim objPage
Dim objControlSentTo
i = InStr(Item.To, ";")
If i = 0 Then
i = InStr(Item.To, ",")
If i > 0 Then
Set objPage = Item.GetInspector.ModifiedFormPages("Terminated Employee
Check List")
Set objControlSentTo = Item.GetInspector.ModifiedFormPages("Terminated
Employee Check List") _
..Controls("TextBox11")
While i <> 0
objControlSentTo = Mid(Item.To, i - 1)
i = 0
Wend
End If
End Function