![]() |
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 have been looking at different ways to retrieve email addresses from
senders' mail items, but I have not found one that I can get to work correctly. I am trying to open the "new contacts" form and put the sender's address of the first email in my inbox to the email input. Does that make any sense? So far I have this code to create a new contact: Private Sub CommandButton1_Click() Set myNameSpace = Application.GetNamespace("MAPI") Set myFolder = myNameSpace.GetDefaultFolder(10) Set myItem = Application.CreateItem(2) myItem.Email1Address = Unload Me myItem.Display End Sub The only problem is that I don't know how to refrence (is that the right word?) the first SenderEmailAddress in my inbox. All of the examples I found concerning this used "myItem" and I'm sure that Outlook wont like me using two myItem in one sub. Where would I refrence the address anyway? In the same Private sub or in ThisOutlookSession? any tips would be apreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
senderemailaddress | marco | Outlook and VBA | 1 | June 7th 07 01:20 PM |
SenderEmailAddress in VB.NET on Outlook 2003 | [email protected] | Add-ins for Outlook | 1 | April 10th 07 04:27 PM |
How to change read only SenderName and SenderEmailAddress | [email protected] | Outlook - General Queries | 3 | April 19th 06 08:22 PM |