How to extract email address from Outlook friendly name cache

Hi guys,
A while ago, somebody wrote a little VBA utility to help us to log CRM events. Whenever a user sends an email to a customer, it logs the fact in our CRM database. This is the programmatic process:
1. Grab the email address from ActiveInspector.CurrentItem.To
2. If it's a valid email address, all well and good. Proceed to Step 8.
3. If not a valid email address (it must be a friendly name, perhaps located in Exchange), look for the address in:
ActiveInspector.CurrentItem.Recipients.Item(1).AddressEntry.GetExchangeUser.PrimarySmtpAddress
4. If it's a valid email address, all well and good. Proceed to Step 8.
5. If not a valid email address (it must be in the user's Contact list), look for the address in:
ActiveInspector.CurrentItem.Recipients.Item(1).AddressEntry.GetContact.Email1Address
6. If it's a valid email address, all well and good. Proceed to Step 8.
7. If not a valid email address, then crash!!!         <<------------------------------------------------- Here's where I'm stuck!
8. Get the CustomerID from the CRM, based on email address.
9. Do a bunch of other stuff (for example, send the email, and log the event in the CRM).
I'm a former Access MVP, and am highly experienced with VBA, but my forte is clearly not Outlook. What I'd like to do is find the email address by looking in the local cache, and make sure I get the actual email address rather than the friendly name.
I'm not sure if 'local cache' is the right word; I know Outlook stores frequently used email address in some sort of cache, even if the user has not explicitly stored it as a Contact. I just don't know how to find it. Can anyone point me in the right
direction, maybe with a method name?
Also, while mucking about with it, I found the following. Would it be useful in this scenario?
ActiveInspector.CurrentItem.Recipients.Item(1).AddressEntry.GetExchangeDistributionList
Many thanks,
Graham R Seach
Regards, Graham R Seach Sydney, Australia

Hi Graham,
This might help you to figure things out a bit.
The contact cache you are looking for is called the nickname cache, also known as the "autocomplete stream."
The nickname files (.nk2) used by older versions of Outlook (2007 and below).
Outlook 2010 and 2013 does not use the NK2 file; it stores the autocomplete cache in the mailbox or data file and caches the addresses in an autocomplete stream at C:\Users\username\AppData\Local\Microsoft\Outlook\RoamCache. The cache is stored in a file
named Stream_Autocomplete_0_[long GUID].dat.
For applications that interact with Outlook 2010 or Outlook 2013, the autocomplete stream is stored as a MAPI property and can be modified using the MAPI or the
PropertyAccessor object of the message. The PropertyAccessor object is exposed in the Outlook 2010 or Outlook 2013 object models.
Outlook 2010 or Outlook 2013 reads the autocomplete stream from a message in the Associated Contents table of the Inbox of the mail account’s delivery store. This hidden message has a message class and subject of IPM.Configuration.Autocomplete. The autocomplete
stream is stored on this message in the PR_ROAMING_BINARYSTREAM property (PidTagRoamingBinary Canonical Property).
References:
How to import .nk2 files into Outlook 2013
Some Application which can read the Nickname Cache
Interacting with the Autocomplete Stream
Autocomplete Stream
https://msdn.microsoft.com/en-us/library/office/ff625291.aspx
Regards,
Satyajit
Please “Vote As Helpful”
if you find my contribution useful or “Mark As Answer” if it does answer your question. That will encourage me - and others - to take time out to help you.

Similar Messages

  • How to extract email address from a certificate?

    I have a PDF that has been signed with a digital signature.
    Using Coldfusion/CFScript and JAVA calls with iText API, I am able to get the following information out of the certificate:
    - Validity dates (from/to)
    - Subject Fields
    - Issuer information
    If I check the certificate in READER under the DETAILS tab of the certificate, I can see "Certificate Data" including the name "RFC822 email".
    The subject fields of the certificate doesn't include the EmailAddress so my question is WHERE do I look to get the email address value for the certificate data "RFC822 email"?
    Any help would be appreciated.
    Thanks!

    Hi there, I'm looking for something similar but wanted to extract the date instead.
    See attach snapshot (Note: this forum wouldn't allow me to upload signed PDF so I'm uploading the image instead)
    I am aware that we can change the appearance of the digital signature to make the date visible but in most case, it is too small to read on hardcopies.
    We resort by manually typing in the date, zoom into PDF (to see visible date associated with digital signature), to click on the digital signature image to open the signature properties dialog, or to open the Signatures tab window that's sitting at the left.
    Manual typing in the date expose us to the problem when the PDF was created vs. the actual date the PDF was signed (data associated with digital signature/certificate).
    Hope I am making sense.
    Regards,
    Devin

  • Extract email address from html

    Hi,
    I am trying to extract "email address"  from an html output query. How would I do that?
    I am on CF9.
    example:
    Query col1:
    <html><head></head><body>today they emailed about it from (mailto:[email protected]) ...hello there and here</body></html>

    Argh!  No!
    God I hate it when people knock together a regex like this and go "Look!  Email address validation!"
    Before one starts down this road, one should read the RFC (http://tools.ietf.org/html/rfc5322, summarised here: http://en.wikipedia.org/wiki/Email_address).
    Your own regex fails my spamtrap email address (for example: [email protected]), because you've forgotten that a + is a legitimate character in the local part of an email address.  Along with a bunch of other completely legit characters.
    Reading on through the RFC you will realise than ANYTHING is valid in the local part of an email address, provided it's quoted (double-quote being another character your regex doesn't accept).
    If someone doesn't want to give you their valid email address, they won't.  I can give you [email protected], and that will pass.  If I do want to give you my address, you should make sure your code will actually accept it!
    I can understand wanting to make sure the punter doesn't key their email address in incorrectly, but your method doesn't help here.  It'd pass [email protected], despite the fact that it should be [email protected]  "Close" is not good enough in these cases.
    The only sensible way of doing this is to ask them to type it in twice.  This will assist people who don't just roll their eyes and copy and paste what they typed in the first box into the second box, wondering why you're wasting their time.  So a typo will be transferred, so it's no help.
    If you really want to get a person's email address, deprive them of something until they respond to an email that you end them.  At the email address they specified. Because they actually don't mind you having their email address.  This only works if you're not simply trying to harvest email addresses for your own benefit, and not the benefit of your subscribers.
    Bottom line: email address is a mug's game, and one not often played by people who know the rules.
    Adam

  • How to read Email address from TO field

    Hi,
    I am try to read email from outlook using JACOB api. now i can able to read all email from outlook.
    my problem is while i am read TO field for Mail , its return the display name instead of email address.
    please any one tell me how to read email address from TO,CC and BCC field.
    Thanks in advance,
    With Regards,
    Ganesh Kumar.L

    Hi all,
    I am solved my problem,
    First i am getting the Recipients object from mail item object,
    and recipient object i can get all my required details.
    Thanks,
    by
    ganesh

  • Extract email addresses from email header - Sender (From) - Mail

    Hi!
    I would like to extract email addresses from email header from field "Sender (From)" and from email body in Mail at the same time.
    I saw only scripts how to extract from email body.
    I get emails asking for some informations about product and many people don't include their email address in the body, so I have to extract from email header as well.
    I would like to extract email addresses from whole email account, separate alphabeticaly, delete duplicates and save it (separated by comma) in text file.
    This I would use for sending massive email to all customers. 
    I'm on OSX 10.6.8.
    Do you have please somebody script for extracting email addresses in the way:
    1. select mail account
    2. run script
    3. save email addresses to txt file
    Thank you for help and advise!

    Hi Neville!
    Last time I was writing basic programs in Turbopascal in 1996.
    Maybe I'm doing something wrong...
    1. I switched off in Mail "Use Smart Addresses".
    2. I changed the path to my account in both commands:
    Command A.
    i=~/Library/Mail/[email protected]@pop.gmail.com # Input file path
    o=~/Desktop/ # Output file path
    n=`date "+%y%m%d%H%M%S"`-"addresses" # time stamped file name
    grep -rh From: $i | grep -o '[-a-zA-Z0-9.]*@.[^>]*' | awk '!seen[$0]++' > $o$n
    Command B.
    grep -rh From: ~/Library/Mail/[email protected]@pop.gmail.com | grep -o '[-a-zA-Z0-9.]*@.[^>]*' | awk '!seen[$0]++' > ~/Desktop/`date \"+%y%m%d%H%M%S\"`"
    3. I write commands in TERMINAL.
    result of Command A:
    List of couple emails same like before switching of "Use Smart Addresses"
    I answered it already above:
    It can extract to .txt file only email addresses from email header which includes after the name as well email address.
    Example:
    From: Neville Hillyer <[email protected]>
    If there is in header only the name without the email address then it's not extracted (email is visible after secondary click on the name)
    Example:
    From: Neville Hillyer
    I just checked that most of emails I have has in the emailheader only the name without the email address so I miss most of email addresses.
    Result of Command B:
    >
    And nothing going on...
    4. I tried the same in AppleScript editor
    Result of Command A:
    Syntax error. A unknown token can’t go after this identifier.
    I changed the path but I still get syntax errors
    (instead of i=~/Library... i put i= Users/muzaa/Library...)
    Result of Command B:
    Syntax error: A “from” can’t go after this identifier.
    grep -rh From: /Users/radimmuzikant/Library/Mail/[email protected]@pop.gmail.com | grep -o '[-a-zA-Z0-9.]*@.[^>]*' | awk '!seen[$0]++' > ~/Desktop/`date \"+%y%m%d%H%M%S\"`"

  • I need a way to extract email address from an offline folder of 13,500 emails. It is still online also but I do not have the password anymore.

    Anyone know how to extract email adresss from a mac mail folder? Thanks

    SandersonShando wrote:
    I mention the word Samsung and you all flip out, and I'm the one that needs to get a life.
    Hyperbole is not very useful on a tech support forum. No one flipped out.
    Whether or not what happened is ridiculous or should or should not have happened is a question for another time and place. You should definitely submit feedback to Apple about it:
    http://www.apple.com/feedback
    Regardless of why it happened or whether it should have happened, the only way to remove the activation lock is to contact Apple. You should be able to do it over the phone. You may be required to send them the original proof of purchase. Use the Contact Us link at the bottom right of every page.
    Once you get the phone working again, do NOT restore it from you existing back up or you will, most likely, be right back where you started.
    Best of luck.

  • Is there a program to extract email addresses from a searchable pdf?

    Is there a program that will extract email addresses from a searchable pdf?
    I scanned a 75 page excel spreadsheet and used OCR to create a searchable pdf. I've verified that the OCR did work, the email address are searchable, but I need a way to extract them from the pdf so that I can add them to an email list database. There is other data in the spreadsheets that is not needed and it is making it impossible to just copy and paste. Does anybody know if there is a program available that works on the mac platform for this. Any help is greatly appreciated. Thanks!
    Nate

    Nate B- wrote:
    Is there a program that will extract email addresses from a searchable pdf?
    I scanned a 75 page excel spreadsheet and used OCR to create a searchable pdf. I've verified that the OCR did work, the email address are searchable, but I need a way to extract them from the pdf so that I can add them to an email list database. There is other data in the spreadsheets that is not needed and it is making it impossible to just copy and paste. Does anybody know if there is a program available that works on the mac platform for this. Any help is greatly appreciated. Thanks!
    Nate
    Nate,
    You might want to repost this in the Unix forum, or one of the scripts forums here:
    AppleScripts: http://discussions.apple.com/forum.jspa?forumID=724
    Unix: http://discussions.apple.com/forum.jspa?forumID=735
    Automator: http://discussions.apple.com/forum.jspa?forumID=1261

  • Extracting email address from all mailbox in Exchange 2010

    Dear Team,
    I've requirement where i need to pull all the email addresses from all user mailbox accounts in exchange 2010. I need all email addresses to which we've send emails to/Communicated with and all received email addresses. Is there any script or Power Shell
    command to extract email addresses from all mailboxes in our domain(Send and Receive)
    Appreciate your quick help.
    Thanks,
    Mike Baig

    No it is not very clear but this is what I understood...
    "which we've send emails from our domain" - From address should be always primary smtp address.
    "which we've received emails to our domain" - This can be secondary smtp addresses as well.
    To get all email addresses (including secondary smtp addresses) you can use below...
    get-mailbox -ResultSize unlimited | Select displayname, primarysmtpaddress, @{Name="Email Addresses";Expression={[string]::join(', ', $_.EmailAddresses)}} | Export-Csv emailaddress.csv -NoTypeInformation
    Blog |
    Get Your Exchange Powershell Tip of the Day from here

  • I can't move my contacts ( phone numbers and email addresses) from outlook express to my 8900 phone

    i can't move my contacts ( phone numbers and email addresses) from outlook express to my 8900 new phone through the usb cable.
    i have the same contacts in both outlook and outlook express, can this help.
    can anybody help

    highland_ddmac wrote:
    I have the 8900 and when I try and synch I get the error "unable to read application data". Very, very annoying.
    Wondering why I switched from Nokia!
    Can anyone help please??
    Hi and Welcome to the Forums!
    A lot more detail is needed to understand your issue...for instance:
    Your specific BB Model
    Your specific BB OS (all 4 octets)
    Your DTM version (again, 4 octets)
    Your PC PIM version
    Your PC OS version
    Good luck and let us know!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • HT201320 i would like to move email addresses from outlook tp my ipad

    i would like to move email addresses from outlook 2010, to my ipad2.
    i also have entered  two email addresses manually, when i attempt to send using those addresses, they are moved to the out box, and a message "...server will not allow transfers.....
    Any helpis appreciated..............
    Best Regards

    There are some wifi-enabled drives that allow you to stream content from them to the iPad e.g. GoFlex Satellite and Kingston Wi-Drive - I haven't used any so I don't know if one is better than the other

  • Extract email addresses from PDF file?

    Hi,
    Does somebody know if there is any -builtin- way to extract email addressed from PDF file in acrobat?
    I tried 'save as' text/excel but this is a laborious task, especially when the pdf is large!
    Thanks

    I've developed a script that does just that. Have a look here:
    http://try67.blogspot.com/2012/02/acrobat-list-all-email-addresses.html

  • Extract Email Addresses From A Webpage

    I'm trying to use automator to extract email addresses from a webpage. I'm a member of my local chamber and we can use other chamber email addresses we just have to copy and paste them from the chamber website. There are about 5,000 members so I would spend a good week doing this. I'm trying to get Automator to take care of it for me. So far I've used the action "Get Current Webpage From Safari" then "Get Text from Webpage" then "Filter Paragraphs" and I filter to only paragraphs with the @ sign would go through. Now I'm lost. All I really need is a list of the email addresses them selves and not all the junk like the company they work for and bla bla bla. All this stuff is also on the same line as the email address so it all comes through. Is there any way to filter specific text rather than an entire paragraph?

    in that page the emails are always at the end of the line. that simplifies the problem somewhat. add the following "run shell script" action to your workflow right after the action that filters out paragraphs that contain emails
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #ADD8E6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    for f in "$@"
    do
    echo "$f"|awk '{print $NF}'
    done</pre>
    pass the input to this action as arguments.
    Message was edited by: V.K.

  • How to import email addresses from yahoo

    how to import email addresses from yahoo

    See:
    *http://help.yahoo.com/l/us/yahoo/contacts/impexp/email/;_ylt=AtR4x2nVc9gwLrhuPWeKFQofUndG
    *http://help.yahoo.com/l/us/yahoo/contacts/impexp/email/contactsimpexp-41.html;_ylt=AmYBdKJeiYVI1vgfvtKf.KRrinpG

  • HT1296 how do I transfer my email addresses from outlook express to iphone3GS

    How do I transfer email contacts from outlook express running on XP to my Iphone 3GS as I do not seem to be able to do it via itunes

    Contacts available with Outlook Express are stored in a separate address book application called Windows Contacts. This is selected under the Info tab for the iPhone sync preferences with iTunes.

  • I need to extract email addresses from my "Sent" folder, how can I do this?

    I have found a way to export addresses using the "export" option inside the address book-however, I need to extract the addresses from my Sent folder specifically. Is there a way to copy and paste into an Excel file? Or is there a way to do this through Thunderbird?

    Every contact you've sent a message to is automatically added to the Collected Addresses address book. One approach would be to create a new address book, then copy the desired contacts from Collected Addresses to that book by drag and drop, while holding the Ctrl key. Then, export the new address book to a csv (comma separated) file and open it in Excel.
    It's also possible to scan a folder for contacts and have them added to an address book:
    https://getsatisfaction.com/mozilla_messaging/topics/adding_email_address_from_folder_to_address_book#reply_10378723

Maybe you are looking for