Retrieve data from GAL and put it in Clipboard

Status
Not open for further replies.

Martin69

New Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Hello,

Hello,

i have already a script that works fine - but i would like to habe a few changes.

the script displays an outlook contact, that was searched by the email adress.

Now i want the following changes:

1) get some Information out of the selected item e.g. department

2) this Information should automatically put in the clipboard

Can somebody help me - thank you!

Sub DisplayAddressEntryDetails(oM As MailItem)
Dim oPA As Outlook.PropertyAccessor
Dim oContact As Outlook.ContactItem
Dim oSender As Outlook.AddressEntry
Dim SenderID As String

'Create an instance of PropertyAccessor
Set oPA = oM.PropertyAccessor

'Obtain PidTagSenderEntryId and convert to string
SenderID = oPA.BinaryToString _
(oPA.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x0C190102"))

'Obtain AddressEntry Object of the sender
Set oSender = Application.Session.GetAddressEntryFromID(SenderID)

'Examine AddressEntryUserType
If oSender.AddressEntryUserType = olOutlookContactAddressEntry Then
'Obtain ContactItem for AddressEntry
Set oContact = oSender.GetContact
oContact.Display
'Display details for Exchange or SMTP sender
Else
oSender.Details

End If
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
D Outlook 2010 Client - "unable to connect to retrieve additional data" for some Distribution lists Exchange Server Administration 7
W How to retrieve the color categories I lost when I changed default data file? Using Outlook 2
K “Outlook is trying to retrieve data..." error. Using Outlook 1
J How can I retrieve data from an .ost file? Using Outlook 3
D Outlook 2003 - lost all data in profile, have been unable to retrieve anything Using Outlook 6
M Outlook VBA Macro that could retrieve/display the (From, Subject, Date Received) Outlook VBA and Custom Forms 2
N How to retrieve user defined fields values to bcm form. Using Outlook 2
F Auto retrieve wont work Using Outlook 1
Chris Smith Outlook 2013 will not retrieve my IMAP mail Using Outlook 1
4 VBA - How to retrieve Meetings Saved but Not Sent? Using Outlook 0
K Outlook favorite folder disappear, how do I retrieve it back? Using Outlook 0
I Retrieve amount of calendar availability and attachments automatically Using Outlook 2
G Cannot retrieve emails past 2 weeks old Exchange Server Administration 1
R Went from outlook 2003 to 2010 - can't retrieve active for contacts Using Outlook 0
X Exchange 2007 Outlook Anywhere Clients unable to retrieve GAL Using Outlook 9
G How to retrieve an email that was compacted in outlook Using Outlook 1
K Need to retrieve email address and password from Microsoft outlook! Using Outlook 1
D Not able to retrieve my emails or get to my contacts using outlook. Using Outlook 3
N All my inbox/junk e mails & contact list have vanished. How can I retrieve them ? Using Outlook 2
B I deleted messages from my blackberry which included my outlook in box. How can I retrieve my deleted messages back to my in box? Using Outlook 1
B Retrieve all user emails from exchnage server 2010 AD Exchange Server Administration 2
L 30 days' worth of emails are gone in Outlook Express; cannot be found anywhere. Is there anyway I can retrieve them? Any help would be appreciated. Using Outlook 1
D I am able to send emails on Outlook, but unable to retrieve emails trying to come in. Using Outlook 1
S How do I retrieve Calendar files that have been archived? Using Outlook 6
S Retrieve messages Using Outlook 1
S Is it possible to retrieve Archived Folders in Outlook from Exchange 2007 after hard disk failure? Exchange Server Administration 8
N I file my mail into mail folders. I went to delete a message and deleted the entire folder...How or can I retrieve. It is not in DELETED mail folde Using Outlook 1
J Client unable to retrieve mailbox Exchange Server Administration 2
K Unable to retrieve information from Exchange 2010 Public Folder after remove server replication Exchange Server Administration 16
4 Retrieve emails in Outlook Using Outlook 1
J how do i retrieve / import / download my old emails and contacts Using Outlook 2
S Retrieve Sent Emails Using Outlook 1
S Switching from Outlook Express to Outlook 2010. How do I retrieve my old emails? Using Outlook 1
C retrieve stationary that was set up in my outlook 2003 mail Using Outlook 3
R How to retrieve lost contact list__ Using Outlook 1
S Outlook Users 50% resource and won't retrieve email Using Outlook 6
P Can I retrieve notes old from Outlook 2003 if I don't have Outlook 2003 on my computer now? Using Outlook 1
J retrieve emails from an exterior hard drive Using Outlook 2
P Retrieve Meeting Response Text Associated with an Appointment Outlook VBA and Custom Forms 1
P CDO MAPI Session failing to retrieve user name but Getexchage user Outlook VBA and Custom Forms 2
J Could not retrieve IMessage: Interface not supported Outlook VBA and Custom Forms 7
S Retrieve the Mails with the attachment names changed Outlook VBA and Custom Forms 3
T Re: mailItem.HTMLBody should retrieve only current text Outlook VBA and Custom Forms 1
D Outlook VBA error extracting property data from GetRules collection Outlook VBA and Custom Forms 10
J Outlook 2013 Change color of text in data fields of contacts in Outlook 2013? Using Outlook 3
T How can Exchange be configured to sync/push one-way so that the server data can't be affected Exchange Server Administration 0
C Can't create Outlook data file Outlook Wishlist 0
T Extract Data From Outlook Tasks Using Outlook 0
F outlook.com Exchane Server corrupts data Since September 2019 Using Outlook.com accounts in Outlook 6
T Extract Data From Outlook Tasks Using Outlook 0
Similar threads


















































Top