Group:  Microsoft Outlook ยป microsoft.public.outlook.program_vba
Thread: Why different To's?

Geek News

Why different To's?
Salad <oil[ at ]vinegar.com> 12/20/2008 4:09:09 PM
For email, if I do
Set obj = objFolder.Items.Item(i)
Msgbox obj.To
I might get Joe Blow or joeblow[ at ]test.com

Is there anyway to always retrieve joeblow[ at ]test.com? Or is there a way
to associate Joe Blow with joeblow[ at ]test.com? Or is there a way to get
the name of the person's inbox?
Re: Why different To's?
"Michael Bauer [MVP - Outlook]" <mb[ at ]mvps.org> 12/20/2008 4:46:48 PM


In the To property you see the display name of a recipient. For the address
see the Recipients collection.

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Sat, 20 Dec 2008 08:09:09 -0800 schrieb Salad:

[Quoted Text]
> For email, if I do
> Set obj = objFolder.Items.Item(i)
> Msgbox obj.To
> I might get Joe Blow or joeblow[ at ]test.com
>
> Is there anyway to always retrieve joeblow[ at ]test.com? Or is there a way
> to associate Joe Blow with joeblow[ at ]test.com? Or is there a way to get
> the name of the person's inbox?
Re: Why different To's?
Salad <oil[ at ]vinegar.com> 12/20/2008 8:45:12 PM
Michael Bauer [MVP - Outlook] wrote:
[Quoted Text]
>
> In the To property you see the display name of a recipient. For the address
> see the Recipients collection.
>
Thanks for the help Michael. I guess I need need more help here. I
have as my code

Dim objFolder As Object
Dim obj as Object
Dim objA As Object
Dim objR As Object


et objFolder = objSession.GetDefaultFolder(FOLDER_INBOX)
olApp.GetNamespace("MAPI").GetDefaultFolder(FOLDER_INBOX)
olApp.GetNamespace("MAPI").GetDefaultFolder(FOLDER_INBOX)
' Loop all items in the Inbox\ Folder
For i = 1 To objFolder.Items.Count
set obj = objFolder.Items.Item(i)

'here's where I get mixed up. I didn't see many/any examples
Set objR = obj.Recipients
Set objA = objR.AddressEntry(0)
MsgBox objA.Address
Next

Could you help me out?
Re: Why different To's?
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 12/20/2008 10:27:19 PM
for each Recip in obj.Recipients
MsgBox Recip.Address
next.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Salad" <oil[ at ]vinegar.com> wrote in message
news:K6-dnc5owa7HxNDUnZ2dnUVZ_qninZ2d[ at ]earthlink.com...
[Quoted Text]
> Michael Bauer [MVP - Outlook] wrote:
>>
>> In the To property you see the display name of a recipient. For the
>> address
>> see the Recipients collection.
>>
> Thanks for the help Michael. I guess I need need more help here. I have
> as my code
>
> Dim objFolder As Object
> Dim obj as Object
> Dim objA As Object
> Dim objR As Object
>
>
> et objFolder = objSession.GetDefaultFolder(FOLDER_INBOX)
> olApp.GetNamespace("MAPI").GetDefaultFolder(FOLDER_INBOX)
> olApp.GetNamespace("MAPI").GetDefaultFolder(FOLDER_INBOX)
> ' Loop all items in the Inbox\ Folder
> For i = 1 To objFolder.Items.Count
> set obj = objFolder.Items.Item(i)
>
> 'here's where I get mixed up. I didn't see many/any examples
> Set objR = obj.Recipients
> Set objA = objR.AddressEntry(0)
> MsgBox objA.Address
> Next
>
> Could you help me out?


Re: Why different To's?
Salad <oil[ at ]vinegar.com> 12/22/2008 2:19:27 AM
Dmitry Streblechenko wrote:

[Quoted Text]
> for each Recip in obj.Recipients
> MsgBox Recip.Address
> next.
>
That did it. Thanks much.


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net