A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Email address of the current user



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 8th 06, 01:55 AM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 17
Default Email address of the current user

Hi Ppl,

I need to retrieve the email address of the current user from an
Appointment item using VB.NET (VS 05) via an add-in.

From what is already out there,

1. Session.CurrentUser may return the SMTP address or the distinguished
name. Which setting on the Exchange server determines what it returns
plz? (Cannot use LDAP as the user may not always be connected to the
Internet/Intranet)
2. In the above scenario, there may or may not be a security message
box. What determines the pop up of this box?
3. Use CDO. There are examples for using it with MailItem. Is it
possible with an Appointment Item?
4. Any alternate solution?

Thnx

  #2  
Old September 8th 06, 02:41 AM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Email address of the current user

1. No such setting. If the Exchange provider is responsible for the user
identity in the profile, you will always get an EX type address. You *can*
retrieve the SMTP address(es) from an EX address entry.
2. Version of Outlook and the API that uou are using - see
http://www.outlookcode.com/d/sec.htm
3. Yes. To do what?
4. Solution to always retrieving an SMTP address? You will need to use
Extended MAPI, CDO 1.21 or Redemption (no OOM) to retrieve either teh
PR_SMTP_ADDRESS property (may not be available in the cached mode) or
PR_EMS_AB_PROXY_ADDRESSES property.
plug
Redemption (url below) exposes SMTPAddress property on the address entries:
set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT 'Outlook 2002 and up
MsgBox Session.CurrentUser.SMTPAddress
/plug

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

wrote in message
s.com...
Hi Ppl,

I need to retrieve the email address of the current user from an
Appointment item using VB.NET (VS 05) via an add-in.

From what is already out there,

1. Session.CurrentUser may return the SMTP address or the distinguished
name. Which setting on the Exchange server determines what it returns
plz? (Cannot use LDAP as the user may not always be connected to the
Internet/Intranet)
2. In the above scenario, there may or may not be a security message
box. What determines the pop up of this box?
3. Use CDO. There are examples for using it with MailItem. Is it
possible with an Appointment Item?
4. Any alternate solution?

Thnx



  #3  
Old September 8th 06, 03:31 AM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 17
Default Email address of the current user

Thanx for the prompt reply.

1. I CAN retrieve the SMTP address(es) from an EX address
entry...really ...How?
3. To retrieve the current user's SMTP address from Appointment form.
4. Extended MAPI, CDO 1.21 - any examples for C# or VB.Net plz?

TIA

Dmitry Streblechenko wrote:
1. No such setting. If the Exchange provider is responsible for the user
identity in the profile, you will always get an EX type address. You *can*
retrieve the SMTP address(es) from an EX address entry.
2. Version of Outlook and the API that uou are using - see
http://www.outlookcode.com/d/sec.htm
3. Yes. To do what?
4. Solution to always retrieving an SMTP address? You will need to use
Extended MAPI, CDO 1.21 or Redemption (no OOM) to retrieve either teh
PR_SMTP_ADDRESS property (may not be available in the cached mode) or
PR_EMS_AB_PROXY_ADDRESSES property.
plug
Redemption (url below) exposes SMTPAddress property on the address entries:
set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT 'Outlook 2002 and up
MsgBox Session.CurrentUser.SMTPAddress
/plug

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

wrote in message
s.com...
Hi Ppl,

I need to retrieve the email address of the current user from an
Appointment item using VB.NET (VS 05) via an add-in.

From what is already out there,

1. Session.CurrentUser may return the SMTP address or the distinguished
name. Which setting on the Exchange server determines what it returns
plz? (Cannot use LDAP as the user may not always be connected to the
Internet/Intranet)
2. In the above scenario, there may or may not be a security message
box. What determines the pop up of this box?
3. Use CDO. There are examples for using it with MailItem. Is it
possible with an Appointment Item?
4. Any alternate solution?

Thnx


  #4  
Old September 8th 06, 07:44 AM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Email address of the current user

1. See #4
2. But the current user's e-mail address has nothing to do with a given
appointment, does it not?
3. You cannot access Extended MAPI from .Net, at least MS does not support
that. There is a MAPI33 library that allows to use Extended MAPi from .Net
languages (I thing VB.Net only, but not C#), but if you never tried Extended
MAPI, don't expect this to be an easy one afternoon project. In CDO 1.21 you
will need to access Session.CurrentUser property, then use
AddressEntry.Fields() to read the PR_SMTP_ADDRESS or
PR_EMS_AB_PROXY_ADDRESSES property. See
http://www.outlookcode.com/d/code/getsenderaddy.htm for an example that
reads a sender SMTP address.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

wrote in message
oups.com...
Thanx for the prompt reply.

1. I CAN retrieve the SMTP address(es) from an EX address
entry...really ...How?
3. To retrieve the current user's SMTP address from Appointment form.
4. Extended MAPI, CDO 1.21 - any examples for C# or VB.Net plz?

TIA

Dmitry Streblechenko wrote:
1. No such setting. If the Exchange provider is responsible for the user
identity in the profile, you will always get an EX type address. You
*can*
retrieve the SMTP address(es) from an EX address entry.
2. Version of Outlook and the API that uou are using - see
http://www.outlookcode.com/d/sec.htm
3. Yes. To do what?
4. Solution to always retrieving an SMTP address? You will need to use
Extended MAPI, CDO 1.21 or Redemption (no OOM) to retrieve either teh
PR_SMTP_ADDRESS property (may not be available in the cached mode) or
PR_EMS_AB_PROXY_ADDRESSES property.
plug
Redemption (url below) exposes SMTPAddress property on the address
entries:
set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT 'Outlook 2002 and up
MsgBox Session.CurrentUser.SMTPAddress
/plug

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

wrote in message
s.com...
Hi Ppl,

I need to retrieve the email address of the current user from an
Appointment item using VB.NET (VS 05) via an add-in.

From what is already out there,
1. Session.CurrentUser may return the SMTP address or the distinguished
name. Which setting on the Exchange server determines what it returns
plz? (Cannot use LDAP as the user may not always be connected to the
Internet/Intranet)
2. In the above scenario, there may or may not be a security message
box. What determines the pop up of this box?
3. Use CDO. There are examples for using it with MailItem. Is it
possible with an Appointment Item?
4. Any alternate solution?

Thnx




 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove current date from an email printout DWMProg Outlook - General Queries 2 August 14th 06 03:37 PM
Outlook Multi-email acct should default "From address" to current SB Outlook - Installation 7 July 31st 06 06:57 PM
how can I send entire address by email to another user sparkle Outlook - Using Contacts 1 June 9th 06 10:23 AM
How do I make OL synchronize w/ current email provider? Karen Outlook - General Queries 1 May 28th 06 05:07 PM
Set which local email account can send mail to contacts in address book. (associating an email address with a contact) Scott Streit Outlook - General Queries 3 January 27th 06 03:57 PM


All times are GMT +1. The time now is 12:21 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-2025 Outlook Banter.
The comments are property of their posters.