• Outlook User
  • Exchange Admin
  • Office 365
  • Outlook Developer
  • Outlook.com
  • Outlook Mac
  • Outlook & iCloud
    • Common Problems
    • Outlook BCM
    • Utilities & Addins

Copy a Contact's Mailing Address

Slipstick Systems

› Outlook › People › Copy a Contact’s Mailing Address

Last reviewed on September 11, 2014     4 Comments

One thing that annoys Outlook users (ok, one of many things!) is the lack of an envelope printing feature or even a quick and easy way to grab an address to use in another program. Yes, you can use the Insert Address control in Word to grab a Contact address from Outlook, but it's slow. Mail merge is slow and overkill for just one address.

envelope
Once again, a macro comes to the recue, copying the name and mailing address to the clipboard so you can use it in any program.

First, you need to set macro security to Low. Go to File, Options, Trust Center in Outlook 2010 or Outlook 2013, then click Macro Security and choose the lowest setting to allow the macro to run. (Later, you can sign it and raise the security level.)

To use, paste the macro into a new module and set a reference to the Microsoft Forms 2.0 Object Library object. To set the reference, go to Tools, References then click Browse and paste C:\Windows\System32\FM20.dll (or browse to find it) and click Open.

See How to use Outlook's VBA Editor for more information.

Copy address to clipboardGo to File, Options, Customize Ribbon and select Macros from Show Commands From dropdown. On the right hand side of the screen, select the location where you want to put the button and click New Group. Select the GetMailingAddress macro and click Add to add it to the Group. Click Rename to give it a friendly name and a new icon.
Now select a contact and click the button to run the macro. A message box will popup containing the name, company name if available, and the mailing address. When you are done testing, comment out the MsgBox box line and sign the macro using selfcert then raise the macro security level, if desired.

Option Explicit
 
Public Sub GetMailingAddress()
    Dim Session As Outlook.NameSpace
    Dim currentExplorer As Explorer
     
    Dim obj As Object
    Dim DataObj As MSForms.DataObject
    Dim strAddress As String
    Set DataObj = New MSForms.DataObject

    Set currentExplorer = Application.ActiveExplorer
    Set obj = currentExplorer.Selection.item(1)

   If obj.Class = olContact Then
    
    With obj
    
     If .CompanyName <> "" Then
       strAddress = .FullName & vbCrLf & .CompanyName & vbCrLf & .MailingAddress
     Else
       strAddress = .FullName & vbCrLf & .MailingAddress
     End If
    
     MsgBox strAddress
    
    DataObj.SetText strAddress
    DataObj.PutInClipboard

     End With
    
   Else
    MsgBox "You need to select a Contact."
   End If
 
    Set currentExplorer = Nothing
    Set obj = Nothing
 
End Sub

Copy a Contact's Mailing Address was last modified: September 11th, 2014 by Diane Poremsky
  • Twitter
  • Facebook
  • LinkedIn
  • Reddit
  • Print

Related Posts:

  • VBA: Get All Contact Details
  • Print Contacts and Contact Photos
  • Map Contact Addresses or Meeting Locations
  • Show the Home Address on a Contact Form by Default

About Diane Poremsky

A Microsoft Outlook Most Valuable Professional (MVP) since 1999, Diane is the author of several books, including Outlook 2013 Absolute Beginners Book. She also created video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums.

Subscribe
Notify of
4 Comments
newest
oldest most voted
Inline Feedbacks
View all comments

AndyZ (@guest_199846)
July 6, 2016 6:26 pm
#199846

Public Sub GetAllContactDetails() Dim Session As Outlook.NameSpace Dim currentExplorer As Explorer Dim obj As Object Dim DataObj As MSForms.DataObject Dim strContactDetails As String Set DataObj = New MSForms.DataObject Set currentExplorer = Application.ActiveExplorer Set obj = currentExplorer.Selection.Item(1) If obj.Class = olContact Then With obj If .FullName <> "" Then strContactDetails = .FullName & vbCrLf If .JobTitle <> "" Then strContactDetails = strContactDetails & .JobTitle & vbCrLf If .Department <> "" Then strContactDetails = strContactDetails & .Department & vbCrLf If .CompanyName <> "" Then strContactDetails = strContactDetails & .CompanyName & vbCrLf If .MailingAddress <> "" Then strContactDetails = strContactDetails & .MailingAddress & vbCrLf If .BusinessAddressCountry <> "" Then strContactDetails = strContactDetails & .BusinessAddressCountry & vbCrLf If .BusinessTelephoneNumber <> "" Then strContactDetails = strContactDetails & "Business: " & .BusinessTelephoneNumber & vbCrLf If .Business2TelephoneNumber <> "" Then strContactDetails = strContactDetails & "Business 2: " & .Business2TelephoneNumber & vbCrLf If .CompanyMainTelephoneNumber <> "" Then strContactDetails = strContactDetails & "Company: " & .CompanyMainTelephoneNumber & vbCrLf If .MobileTelephoneNumber <> "" Then strContactDetails = strContactDetails & "Mobile: " & .MobileTelephoneNumber & vbCrLf If .Email1Address <> "" Then strContactDetails = strContactDetails & .Email1Address & vbCrLf If .WebPage <> "" Then strContactDetails = strContactDetails & "Company Page: " & .WebPage… Read more Âğ

0
0
Reply
AndyZ (@guest_199845)
July 6, 2016 6:26 pm
#199845

Diane, thank you so much for this and all the times you've helped me with Outlook issues. I often need to copy a Contact's details to share with others and to put into appointments. I've used Copy2Contact in the past but it is limited and buggy, and now is very expensive since they converted to a subscription model. Anyway after updating to Windows 10 and Outlook 2016 (which you helped me with) I cast about for a way to replace Copy2Contacts "copy details" functionality. Your code helped me figure it out. I'll paste it in a following comment in the hopes it will help others:

0
0
Reply
Audil (@guest_187221)
October 29, 2014 6:47 am
#187221

Hi is there any way to deploy macros to multiple users?

1
-1
Reply
Diane Poremsky (@guest_187234)
Reply to  Audil
October 29, 2014 10:59 am
#187234

No, not really. You can push the OTM file out to users (it will overwrite any macros they have) but they will need to enable them. (Just opening the editor should do it.)

1
-1
Reply

Visit Slipstick Forums.
What's New at Slipstick.com

Latest EMO: Vol. 28 Issue 22

Support Services

Do you need help setting up Outlook, moving your email to a new computer, migrating or configuring Office 365, or just need some one-on-one assistance?

Subscribe to Exchange Messaging Outlook






Our Sponsors

CompanionLink
ReliefJet
  • Popular
  • Latest
  • WeekMonthAll
  • How to Remove the Primary Account from Outlook
  • Adjusting Outlook's Zoom Setting in Email
  • Outlook: Web Bugs & Blocked HTML Images
  • Save Sent Items in Shared Mailbox Sent Items folder
  • Move an Outlook Personal Folders .pst File
  • Create rules that apply to an entire domain
  • Use PowerShell to get a list of Distribution Group members
  • View Shared Calendar Category Colors
  • How to Create a Pick-a-Meeting Request
  • Outlook Auto Account Setup: Encrypted Connection not available
  • Send Individual Messages when Sending Bulk Email
  • Centrally managed signatures in Office 365?
  • Create a rule to delete spam with no sender address
  • Open Outlook Folders using PowerShell or VBScript
  • Cannot add Recipients in To, CC, BCC fields on MacOS
  • Change Appointment Reminder Sounds
  • Messages appear duplicated in message list
  • Reset the New Outlook Profile
  • Delete Old Calendar Events using VBA
  • Use PowerShell or VBA to get Outlook folder creation date
Ajax spinner

Newest Code Samples

Delete Old Calendar Events using VBA

Use PowerShell or VBA to get Outlook folder creation date

Rename Outlook Attachments

Format Images in Outlook Email

Set Outlook Online or Offline using VBScript or PowerShell

List snoozed reminders and snooze-times

Search your Contacts using PowerShell

Filter mail when you are not the only recipient

Add Contact Information to a Task

Process Mail that was Auto Forwarded by a Rule

Recent Bugs List

Microsoft keeps a running list of issues affecting recently released updates at Fixes or workarounds for recent issues in Outlook for Windows.

Outlook for Mac Recent issues: Fixes or workarounds for recent issues in Outlook for Mac

Office Update History

Update history for supported Office versions is at Update history for Office

Outlook Suggestions and Feedback

Outlook Feedback covers Outlook as an email client, including Outlook Android, iOS, Mac, and Windows clients, as well as the browser extension (PWA) and Outlook on the web.

Use Outlook.com Feedback for suggestions or feedback about Outlook.com accounts.

Other Microsoft 365 applications and services




Windows 10 Issues

  • iCloud, Outlook 2016, and Windows 10
  • Outlook Links Won’t Open In Windows 10
  • Outlook can’t send mail in Windows 10: error Ox800CCC13
  • Missing Outlook data files after upgrading Windows?

Outlook Top Issues

  • The Windows Store Outlook App
  • The Signature or Stationery and Fonts button doesn’t work
  • Outlook’s New Account Setup Wizard
  • Outlook 2016: No BCM
  • Exchange Account Set-up Missing in Outlook 2016

VBA Basics

How to use the VBA Editor

Work with open item or selected item

Working with All Items in a Folder or Selected Items

VBA and non-default Outlook Folders

Backup and save your Outlook VBA macros

Get text using Left, Right, Mid, Len, InStr

Using Arrays in Outlook macros

Use RegEx to extract message text

Paste clipboard contents

Windows Folder Picker

Custom Forms

Designing Microsoft Outlook Forms

Set a custom form as default

Developer Resources

Developer Resources

Developer Tools

VBOffice.net samples

SlovakTech.com

Outlook MVP David Lee

Repair PST

Convert an OST to PST

Repair damaged PST file

Repair large PST File

Remove password from PST

Merge Two Data Files

Sync & Share Outlook Data

  • Share Calendar & Contacts
  • Synchronize two computers
  • Sync Calendar and Contacts Using Outlook.com
  • Sync Outlook & Android Devices
  • Sync Google Calendar with Outlook
  • Access Folders in Other Users Mailboxes

Contact Tools

Data Entry and Updating

Duplicate Checkers

Phone Number Updates

Contact Management Tools

Diane Poremsky [Outlook MVP]

Make a donation

Calendar Tools

Schedule Management

Calendar Printing Tools

Calendar Reminder Tools

Calendar Dates & Data

Time and Billing Tools

Meeting Productivity Tools

Duplicate Remover Tools

Mail Tools

Sending and Retrieval Tools

Mass Mail Tools

Compose Tools

Duplicate Remover Tools

Mail Tools for Outlook

Online Services

Productivity

Productivity Tools

Automatic Message Processing Tools

Special Function Automatic Processing Tools

Housekeeping and Message Management

Task Tools

Project and Business Management Tools

Choosing the Folder to Save a Sent Message In

Run Rules on messages after reading

Help & Suggestions

Submit Outlook Feature Requests

Slipstick Support Services

Home | Outlook User | Exchange Administrator | Office 365 | Outlook.com | Outlook Developer
Outlook for Mac | Common Problems | Utilities & Addins | Tutorials
Outlook & iCloud Issues | Outlook Apps
EMO Archives | About Slipstick | Advertise | Slipstick Forums
Submit New or Updated Outlook and Exchange Server Utilities

Send comments using our Feedback page
Copyright © 2023 Slipstick Systems. All rights reserved.
Slipstick Systems is not affiliated with Microsoft Corporation.

wpDiscuz

Sign up for Exchange Messaging Outlook

Our weekly Outlook & Exchange newsletter (bi-weekly during the summer)






Please note: If you subscribed to Exchange Messaging Outlook before August 2019, please re-subscribe.

Never see this message again.

You are going to send email to

Move Comment