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.
Similar threads
Thread starter Title Forum Replies Date
glnz How to retrieve or redo Verizon.net email password without affecting Outlook connection? Using Outlook 1
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
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
C Advanced search terms for "Outlook Data File" Using Outlook 1
C Populate form data into message body Outlook VBA and Custom Forms 1
CWM550 Saving Data: Don't check certain folders Using Outlook 2
CWM550 Importing " Old Skool" Data Using Outlook 0
W Create a Quick Step or VBA to SAVE AS PDF in G:|Data|Client File Outlook VBA and Custom Forms 1
Wotme create email only data file Using Outlook 1
V Backup Calendar, Contacts, Tasks in an POP3 data file Using Outlook 3
e_a_g_l_e_p_i Changing where data .pst is saved to Using Outlook 3
J Deliver new messages to New or Existing Data File? Using Outlook 2
G Outlook 2016: Want IMAP Data Files on My D: Drive and Not C: Drive Using Outlook 1
T vba extract data from msg file as attachment file of mail message Outlook VBA and Custom Forms 1
D Outlook 2016 Unable to load Outlook data pst file Using Outlook 5
V Form data not sending for some users Outlook VBA and Custom Forms 2
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 10
T How can Exchange be configured to sync/push one-way so that the server data can't be affected Exchange Server Administration 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
E To convert imported data to custom fields in Task list Outlook VBA and Custom Forms 1
R "Can't store Outlook data files under the AppData folder. Please choose another folder." Using Outlook 6
C How to export Outlook data to csv? Using Outlook 0
RBLampert Assigning a newly (re)created e-mail account to a specific .pst data file Using Outlook 2
S newly added shared mailboxes downloading 500GB data a day Exchange Server Administration 1
M Using field names to capture a data element Using Outlook 0
S Custom Form, copy user field data to message body Outlook VBA and Custom Forms 12
M Outlook 2016 Requesting data from server Using Outlook 0
G Entered data in custom field goes in card and does not stay in list view Outlook VBA and Custom Forms 1
E Copying data from e-mail attachement to EXCEL file via macro Outlook VBA and Custom Forms 38
Sofia Manni Some of my favorite data in outlook. Using Outlook 2
A Outlook 2016 Will Not Show Any Data In the People Pane Using Outlook 17
A Script to fetch data from mails in restricted collection and sending them to excel Using Outlook 1
Commodore Search cannot complete the indexing of your Outlook data Using Outlook 6
P Microsoft Outlook is requesting data from the server Using Outlook 2
S BCM Auto Backup Data and Customizations BCM (Business Contact Manager) 6

Similar threads

Back
Top