• Outlook User
  • Exchange Admin
  • Office 365
  • Outlook Developer
  • Outlook.com
  • Outlook Mac
  • Outlook & iCloud
    • Common Problems
    • Outlook BCM
    • Utilities & Addins
    • Video Tutorials
    • EMO Archives
    • Outlook Updates
    • Outlook Apps
    • Forums

Copy a Contact's Mailing Address

Slipstick Systems

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

Last reviewed on September 11, 2014     4 Comments

September 11, 2014 by Diane Poremsky 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

Related Posts:

  • VBA: Get All Contact Details
  • Print Contacts and Contact Photos
  • Lookup a Contact's time zone
  • Map Contact Addresses or Meeting Locations

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.

4
Leave a Reply

2500
Photo and Image Files
 
 
 
Audio and Video Files
 
 
 
Other File Types
 
 
 
2500
Photo and Image Files
 
 
 
Audio and Video Files
 
 
 
Other File Types
 
 
 

  Subscribe  
newest oldest most voted
Notify of
AndyZ
AndyZ

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 »

Vote Up00Vote Down Reply
July 6, 2016 6:26 pm
AndyZ
AndyZ

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:

Vote Up00Vote Down Reply
July 6, 2016 6:26 pm
Audil
Audil

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

Vote Up1-1Vote Down Reply
October 29, 2014 6:47 am
Diane Poremsky

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.)

Vote Up1-1Vote Down Reply
October 29, 2014 10:59 am

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

Latest EMO: Vol. 24 Issue 3

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

  • Popular
  • Latest
  • Week Month All
  • Adjusting Outlook's Zoom Setting in Email
  • The Signature or Stationery and Fonts button doesn't work
  • Security Certificate Warning in Microsoft Outlook
  • This operation has been cancelled due to restrictions
  • How to Remove the Primary Account from Outlook
  • Two Copies of Sent Messages in Outlook
  • iCloud error: Outlook isn't configured to have a default profile
  • Outlook's Rules and Alerts: Run a Script
  • Outlook is Not Recognized as the Default Email Client
  • Outlook and Gmail's Less Secure Apps Setting
  • Outlook.com: Manage Subscriptions
  • Group By Views don’t work in To-Do List
  • Category shortcuts don’t work
  • How to disable the Group By view in Outlook
  • Adjusting Outlook's Zoom Setting in Email
  • Change the Subject of an Incoming Message
  • Creating Signatures in Outlook
  • Scheduling a Recurring Message
  • OneNote is missing from Office 365 / 2019
  • Create Rules using PowerShell
Ajax spinner

Newest VBA Samples

Adjusting Outlook's Zoom Setting in Email

Move email items based on a list of email addresses

Remove prefix from Gmail meeting invitations

How to hide LinkedIn, Facebook, Google and other extra contact folders in Outlook.com

Use VBA to create a Mail Merge from Excel

Open multiple Outlook windows when Outlook starts

Set most frequently used Appointment Time Zones

How to change the From field on incoming messages

VBA: File messages by client code

Update Contact Area Codes

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.

Windows 10 Issues

  • iCloud, Outlook 2016, and Windows 10
  • Better Outlook Reminders?
  • Coming Soon to Windows 10: Office 365 Search
  • Outlook Links Won’t Open In Windows 10
  • BCM Errors after Upgrading to Windows 10
  • Outlook can’t send mail in Windows 10: error Ox800CCC13
  • Missing Outlook data files after upgrading Windows?

Outlook 2016 Top Issues

  • The Windows Store Outlook App
  • Emails are not shown in the People Pane (Fixed)
  • Calendars aren’t printing in color
  • The Signature or Stationery and Fonts button doesn’t work
  • Outlook’s New Account Setup Wizard
  • BCM Errors after October 2017 Outlook Update
  • Excel Files Won’t Display in Reading Pane
  • 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

Outlook-tips.net Samples

VBOffice.net samples

OutlookCode.com

SlovakTech.com

Outlook MVP David Lee

MSDN Outlook Dev Forum

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
  • “Live” Group Calendar Tools

Convert to / from Outlook

  • Converting Messages and Calendar or
    Address books
  • Moving Outlook to a New Computer
  • Moving Outlook 2010 to a new Windows computer
  • Moving from Outlook Express to Outlook

Recover Deleted Items

  • Recover deleted messages from .pst files
  • Are Deleted Items gone forever in Outlook?

Outlook 2013 Absolute Beginner's Guide

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

Outlook Suggestion Box (UserVoice)

Slipstick Support Services

Contact Tools

Data Entry and Updating

Duplicate Checkers

Phone Number Updates

Contact Management Tools

Sync & Share

Share Calendar & Contacts

Synchronize two machines

Sharing Calendar and Contacts over the Internet

More Tools and Utilities for Sharing Outlook Data

Access Folders in Other Users Mailboxes

View Shared Subfolders in an Exchange Mailbox

"Live" Group Calendar Tools

Home | Outlook User | Exchange Administrator | Office 365 | Outlook.com | Outlook Developer
Outlook for Mac | Outlook BCM | 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 © 2019 Slipstick Systems. All rights reserved.
Slipstick Systems is not affiliated with Microsoft Corporation.

You are going to send email to

Move Comment