Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Get email address from name (http://www.outlookbanter.com/outlook-vba/26720-get-email-address-name.html)

Bingo September 12th 06 11:20 AM

Get email address from name
 
Hi group !

I wonder how I can find an email address from a real name in VBA ?
I am tweaking a macro to export an appointment to an ics file, and
I need to set the "ORGANIZER:" field to "MAILTO:organizer's email
address".
The AppointmentItem.Organizer only contains the name of the
organizer, not his email.
Is there an easy way to do this ?

(Actually, the organizer is always the current user, so I kind of
need to retrieve the current user's email address, if it is easier
this way)

Thanks for your help !
--
Arnaud

Michael Bauer [MVP - Outlook] September 13th 06 06:47 AM

Get email address from name
 
Am Tue, 12 Sep 2006 11:20:04 +0200 schrieb Bingo:

Arnaud, you can search for the name in the contacts.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Hi group !

I wonder how I can find an email address from a real name in VBA ?
I am tweaking a macro to export an appointment to an ics file, and
I need to set the "ORGANIZER:" field to "MAILTO:organizer's email
address".
The AppointmentItem.Organizer only contains the name of the
organizer, not his email.
Is there an easy way to do this ?

(Actually, the organizer is always the current user, so I kind of
need to retrieve the current user's email address, if it is easier
this way)

Thanks for your help !
--
Arnaud


Arnaud Lesauvage September 14th 06 09:11 AM

Get email address from name
 
Michael Bauer [MVP - Outlook] wrote:
Am Tue, 12 Sep 2006 11:20:04 +0200 schrieb Bingo:

Arnaud, you can search for the name in the contacts.


Thanks Michael !
Is the current user always included in the contacts collection ?

Regards
--
Arnaud

Michael Bauer [MVP - Outlook] September 14th 06 02:40 PM

Get email address from name
 
Am Thu, 14 Sep 2006 09:11:22 +0200 schrieb Arnaud Lesauvage:

No.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Michael Bauer [MVP - Outlook] wrote:
Am Tue, 12 Sep 2006 11:20:04 +0200 schrieb Bingo:

Arnaud, you can search for the name in the contacts.


Thanks Michael !
Is the current user always included in the contacts collection ?

Regards
--
Arnaud


Arnaud Lesauvage September 14th 06 02:59 PM

Get email address from name
 
Michael Bauer [MVP - Outlook] wrote:
Am Thu, 14 Sep 2006 09:11:22 +0200 schrieb Arnaud Lesauvage:
Is the current user always included in the contacts collection ?

No.


Is there a way to retrieve the current user's email address then ?
All our appointment have their user as the organizer, so my macro
should retrieve his address !

Michael Bauer [MVP - Outlook] September 15th 06 07:18 AM

Get email address from name
 
Am Thu, 14 Sep 2006 14:59:40 +0200 schrieb Arnaud Lesauvage:

In OL 2003 you can read the Session.CurrentUser.Address property.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Michael Bauer [MVP - Outlook] wrote:
Am Thu, 14 Sep 2006 09:11:22 +0200 schrieb Arnaud Lesauvage:
Is the current user always included in the contacts collection ?

No.


Is there a way to retrieve the current user's email address then ?
All our appointment have their user as the organizer, so my macro
should retrieve his address !


Arnaud Lesauvage September 15th 06 09:43 AM

Get email address from name
 
Michael Bauer [MVP - Outlook] wrote:
Am Thu, 14 Sep 2006 14:59:40 +0200 schrieb Arnaud Lesauvage:

In OL 2003 you can read the Session.CurrentUser.Address property.


In OL2000 too !!
Excellent !
Thanks a lot Michael !

--
Arnaud


All times are GMT +1. The time now is 08:36 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com