Re: find sender info

Tech-Archive recommends: Speed Up your PC by fixing your registry



Thanks
I got up to this point

Dim myolApp As Outlook.Application
Dim myNamespace As Outlook.NameSpace
Dim myRecipient As Outlook.Recipient
Set myolApp = CreateObject("Outlook.Application")
Set myNamespace = myolApp.GetNamespace("MAPI")
Set myRecipient = myNamespace.CreateRecipient(msg.SenderEmailAddress)
'myRecipient.Resolve
myRecipient.AddressEntry

But I can't find the office location based on AddressEntry, Office location
is in contacts and I'm not sure how to continue this code ?
Any siggestions?

--
Best regards,
Edward


"Dmitry Streblechenko" wrote:

If you are using the Outlook Obejct Model, you best bet is probably to take
the value of the MailItem.SenderEmailAddress property and use it to call
Namespace.CreateRecipient, followed by Recipient.Resolve. You should then be
able to access the Recipeint.AddressEntry objeect.
Strictly speaking, no name/address/etc resolution is necessary since the
message already contains the sender entry id (PR_SENDER_ENTRYID MAPI
property), but OOM does not expose it.
<plug> Redemption woudl let you directly access the sender properties
through the RDOMail.Sender property </plug>

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Edward" <Edward@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0F1235ED-6707-45EF-B7E1-19558844044D@xxxxxxxxxxxxxxxx
Hi everybody,
I know how to get sender's name programatically but I don't know how to
get
additional infor like (Office,department) , We use outlook 2003 and
exchange
server each person has those additional inofmration in his/her global
address
list
--
Best regards,
Edward



.



Relevant Pages

  • Re: Loop through all folders in a mailbox
    ... Dim myOlApp As Application ... Dim myNameSpace As NameSpace ... Dim myFolder As MAPIFolder ...
    (microsoft.public.outlook.program_vba)
  • Promt Window
    ... Dim myolApp As Outlook.Application ... Dim myNamespace As Outlook.NameSpace ... Dim myMailItem As Outlook.MailItem ...
    (microsoft.public.outlook.program_vba)
  • Re: Close document
    ... Dim myolApp As Outlook.Application ... Dim myNamespace As Outlook.NameSpace ... Dim myMailItem As Outlook.MailItem ...
    (microsoft.public.outlook.program_vba)
  • Re: Marking a Task Completed for another User
    ... Dim myNamespace As Outlook.NameSpace ... Dim myRecipient As Outlook.Recipient ... Dim myItem As Outlook.TaskItem ...
    (microsoft.public.outlook.program_vba)
  • RE: Confirmation message before sending e-mail
    ... Dim myolApp As Outlook.Application ... Dim myNamespace As Outlook.NameSpace ... Dim SendingItem As Outlook.MailItem ...
    (microsoft.public.outlook.program_vba)