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

Recipient name as shown on the message



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 10th 07, 07:16 PM posted to microsoft.public.outlook.program_addins
István Becze
external usenet poster
 
Posts: 10
Default Recipient name as shown on the message

I'm developing an Outlook add-in and I trying to capture the recipient name
in the same format as it is shown on the message as follows:

Assume you reply to an e-mail and you see the following resolved e-mail
address in the "To" field:
John Doe
I would like to capture the above entire string in my add-in. (Note: The
MailItem.To property will only return the display name, which is 'John Doe'.)

Is there any other property of either the MailItem or the Inspector, that
will return the string that the user sees on the screen?

Do I have to recreate the string myself? The problem with this case is that
Global address book addresses have different format (i.e. only the display
name is shown) on the screen.

Thanks,

Istvan

Ads
  #2  
Old July 10th 07, 09:52 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Recipient name as shown on the message

Do you really need whatever Outlook displays or the e-mail address? In the
latter case, use the MailItem.Recipients colection to read the
Recipient.Name and Recipient.Address properties.

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

"Istvan Becze" wrote in message
news
I'm developing an Outlook add-in and I trying to capture the recipient
name
in the same format as it is shown on the message as follows:

Assume you reply to an e-mail and you see the following resolved e-mail
address in the "To" field:
John Doe
I would like to capture the above entire string in my add-in. (Note: The
MailItem.To property will only return the display name, which is 'John
Doe'.)

Is there any other property of either the MailItem or the Inspector, that
will return the string that the user sees on the screen?

Do I have to recreate the string myself? The problem with this case is
that
Global address book addresses have different format (i.e. only the display
name is shown) on the screen.

Thanks,

Istvan



  #3  
Old July 10th 07, 10:26 PM posted to microsoft.public.outlook.program_addins
István Becze
external usenet poster
 
Posts: 10
Default Recipient name as shown on the message


Hi Dmitr,

Unfortunately I need what Outlook shows on the screen.

Without going into much details, what I'm trying to do is to pop up a dialog
box from the message window and I want to show the same "To" list to the user
on the dialog, so that the user doesn't get confused why one shows the email
address and why the other doesn't.

I see that I can reproduce what Outlook shows by looking into each
recipient's AddressEntry.AddressEntryUserType in Outlook 2007 or the
AddressEntry.Type field, if I want to run the code on both 2003 and 2007, but
I would have preferred to get this info from Outlook, since replicating a
piece of code is always a potential place for errors.

Thanks for your reply,

Istvan

 




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
Message could not be sent because recipient is rejected by server Larry Outlook Express 5 April 22nd 07 01:05 AM
Outlook 2000 Faxes not queuing - The Microsoft Fax transport failed to deliver the message to the recipient. SteveMc Outlook - General Queries 3 December 19th 06 09:04 PM
Message received by recipient not clear carlo Outlook Express 4 July 1st 06 09:25 PM
IMPORTANT Software-Development: How to identify the body/sender/recipient when the selected message is changed Kevin Stumpf Outlook Express 1 June 20th 06 11:46 AM
Recipient appears twice in the message header Ed Outlook - General Queries 0 January 20th 06 03:01 PM


All times are GMT +1. The time now is 08:46 AM.


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.