![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
Ads |
#2
|
|||
|
|||
![]()
objControlSentTo.Value = Mid(Item.To, i - 1)
But this is a futile operation, because any values in unbound text boxes are not persisted when the item is sent. You should be setting an Outlook property instead. See http://www.outlookcode.com/d/propsyntax.htm -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "adubb" wrote in message ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Maintain form when recipient forwards to another recipient | Holly Utzinger | Outlook - Using Forms | 3 | May 5th 06 12:40 AM |
Copy and paste recipients list into To field of new email message displays as ; | [email protected] | Outlook - General Queries | 0 | March 9th 06 05:19 PM |
How do I copy data from one field to another? | reiner | Outlook - Using Contacts | 3 | February 19th 06 08:56 PM |
Populate Company field from Contact field in custom task form | Sue Mosher [MVP-Outlook] | Outlook - Using Forms | 0 | January 20th 06 08:37 PM |
Copy 1 Text Field into another on Form, DateAdd and macros | Michael Anderson | Outlook and VBA | 9 | January 18th 06 11:37 PM |