Copy/paste mailing address Outlook 2013

Status
Not open for further replies.

Rick Luke

New Member
Outlook version
Outlook 2013 32 bit
Email Account
POP3
I am quite confused by what should be a simple thing. I have been helping a friend get everything moved onto a new computer (Windows 7 Pro 32 bit, Outlook 2013 32 bit), so I cannot do any testing on my own computer. On his old computer he used MS Works which used the Windows Address Book, as well as a Works Database file for a customized address book. I wanted to simplify things for him and get everything into a single address book. I got the Windows Address Book imported into a Contacts file in Outlook 2013, and will not attempt to import the Works address database.

The simple thing that has both of us stumped, and frustrated, is how do you copy a mailing address and paste it into MS Word? Please do not suggest the 50 click Mail Merge monster as a solution. I will give a simplified example. In MS Word I am typing a letter and want to tell someone what a mutual friend's new mailing address is. I should be able to open Outlook, go to People/Contacts, select the desired person, highlight/select the mailing address, Copy, switch to Word, and Paste. What is the magic solution?

Here are things that have been tried and failed.
1. Using the Outlook view=Business Card. I can select the person, right-click, Copy. This is not what I want because the Paste also gives the telephone and email, so a bunch has to be deleted.
2. Modifying the Business Card view. I thought I could take the telephone and email address fields out of that view, but I cannot modify the list of fields. Not even if I copy Business Card to a new view. The strange thing here is that I can modify the layout of a Business Card for an individual person to get the desired Paste result, but I am not going to change it on each person.
3. Create a new view based on Card. This looks wonderful in Outlook after choosing just the Full Name and Mailing Address fields. It Pastes horribly because you get the field names, so you have to do some deleting. Is there a way to eliminate the field names?
4. Using the Outlook view=Envelope List. This came the closest to working, but the Paste is still horrible because all the fields are on the same line, so you have to add several cr/lf (Enter key).
5. In any Outlook view, highlight/select just the mail address fields to be copied. Cannot do that.

My friend is ready to dump Outlook and go back to using Works, but the Windows Address Book is not available in Windows 7.
 
3. is how i do it - done right, it won't include the fields.
"If you use a card view with just the File As, Company, and Address field, the address will be formatted perfectly for envelopes."
http://www.outlook-tips.net/tips/tip-685-copy-names-and-addresses/

2. should work too. Not sure if they changed anything in 2013, but it's picking up the business numbers if one exists on the contact.

You can also use the Insert Address command in word, but its slower IMHO. Customize the ribbon to add it to QAT. Click it, select a contact and insert.[DOUBLEPOST=1409836357,1409836248][/DOUBLEPOST]At least in Outlook 2013, the card view should be file as, address - company: is included if you use the company field.
 
...
3. Create a new view based on Card. This looks wonderful in Outlook after choosing just the Full Name and Mailing Address fields. It Pastes horribly because you get the field names, so you have to do some deleting. Is there a way to eliminate the field names?
...

I got back over to my Friend's computer and did some more experimentation. Thank you Diane for giving me some hope and ideas to try. I found out a few things to share.
  • The best results on this come from creating a completely new View, set the desired fields, and then never change the field list again. This explains why Diane said my #3 worked for her but it didn't work for me. I had modified the View's field list several times.
  • I got varied results for the name. The Card type of view starts with the name being the File As field, and that does not paste with the field name (unless you remove and later add this field, then you do get the paste containing the field name). My friend prefers the name from the Full Name field, but that nearly always gets pasted with the field name. If you create a new view, add Full Name to the field list, move it to the top of the list, then sometimes it will paste without the field name (I couldn't see any logical explanation for the variation).
  • I could not find any combination where the Company field would paste without the field name. When the Company field is empty then it does not paste a blank line (not even the field name, finally something to be thankful for).
I had worked through combinations for a couple of hours, and had a few views to show my friend. After much explaining, he reluctantly chose one. His preference was to delete the field names for Company and Full Name, instead of re-arranging the File As name. It has a field list in this order: Company, Full Name, Mailing Address. The sort is on File As (name field), and I added a filter of Mailing Address is not empty.

I think that I have exhausted all of the possibilities within the View limitations, and did not achieve the desired results. I guess I will have to start exploring some kind of custom form, because I still think the original goal is valid.
 
Hmmm. a simple macro with a msgbox should work... should even be able to send the address to the clipboard.
 
Ok... definitely quickie - this copies the full name and mailing address to the clipboard. You can add company name and other fields if desired. You will need to reference the forms data object - instructions are here - http://www.slipstick.com/developer/code-samples/paste-clipboard-contents-vba/


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

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

    With obj
    strAddress = .FullName & vbCrLf & .MailingAddress
    'MsgBox strAddress
    DataObj.SetText strAddress
    DataObj.PutInClipboard


     End With
    Set currentExplorer = Nothing
    Set obj = Nothing
End Sub
 
Thank you Diane for the Macro code. I gave it a try and that has gotten much closer to what my friends is looking for. I did add the CompanyName field, so that line becomes
Code:
strAddress = .CompanyName & vbCrLf & .FullName & vbCrLf & .MailingAddress
and the result pastes with the first line being blank if the CompanyName field is empty.

Now I am left to wonder if there is some kind of if-then test that could be used to pick up the CompanyName field only when it contains something? I have some other programing experience, but none with Visual Basic.

I ran into a couple of small problems in getting the Macro working.
  • As Diane had mentioned, I did get the "Compile Error: user-defined type not defined", and had an extra problem adding that library. The FM20.DLL (along with FM20ENU.DLL) file is located at "C:\Program Files\Microsoft Office 15\root\vfs\Systemx86". This computer has Windows 7 Professional 32-bit, and Office 2013 Professional 32-bit.
  • In order to add that library to the References list I found that I could access Tools -> References only when I had just opened VB and before I had opened a project.
 
You can use if - then
simplest would be
if .companyname = "" then ' or use <> "" for is not blank
' whatever
else
'whatever
end if

the version i put on my website has an if - http://www.slipstick.com/outlook/contacts/copy-contacts-mailing-address/[DOUBLEPOST=1411006499,1411006032][/DOUBLEPOST]I always use the windows\system32 path - i think windows just redirects to the one in office (its the same build #)
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
Stilgar Relsik Create a rule to copy text from an email and paste it in the subject line. Using Outlook 1
H Macro to Copy Specific content from Mail Body and Paste to Excel Outlook VBA and Custom Forms 4
A Outlook: copy & paste Outlook VBA and Custom Forms 9
V Copy and paste body and subject and send multiple emails Outlook VBA and Custom Forms 3
G outlook 13 copy & paste without losing formatting Using Outlook 1
C Copy Cell value from Excel and paste into current email Outlook VBA and Custom Forms 10
D Open attached CSV, copy newdata and paste it to database CSV Outlook VBA and Custom Forms 2
O Copy email content and paste into new Word Document using a different font Using Outlook 1
L "sometimes" cant send mail, we have to copy and paste the message and resend? Using Outlook 2
R how to copy a list of email contacts and paste them only as names (not names + email address) Using Outlook 12
K Copy Entire Email Content - Paste into new Task Outlook VBA and Custom Forms 2
K How to copy Contact Item to Clipboard and Paste as "VCF Link? Outlook VBA and Custom Forms 4
S Using copy paste to grab email addresses from the TO: address fiel Using Outlook 14
C Copy from one Profile to another Using Outlook 0
M "Attachment Detacher for Outlook" add in, does it update the server copy of the email? Using Outlook 1
C Outlook 365 Copy/Save Emails in Folder Outside Outlook to Show Date Sender Recipient Subject in Header Using Outlook 0
D Copy Appointment Body to Task Body Outlook VBA and Custom Forms 0
M copy field value to custom field Outlook VBA and Custom Forms 0
O In Agenda-view - How to copy an existing item months ahead or back? Using Outlook 0
C Move or copy from field to field Outlook VBA and Custom Forms 0
Z Copy specific email body text Outlook VBA and Custom Forms 0
B Need to Copy an email to a subfolder Outlook VBA and Custom Forms 2
O Outlook 365 - How to create / copy a new contact from an existing one? Using Outlook 5
S Copy Tasks/Reminders from Shared Mailbox to Personal Tasks/Reminders Outlook VBA and Custom Forms 0
A Cannot copy this folder because it may contain private items Using Outlook 0
C Copy Move item won't work Outlook VBA and Custom Forms 2
Z VBA to convert email to task, insert text of email in task notes, and attach copy of original email Outlook VBA and Custom Forms 4
Commodore Move turns into "copy" Using Outlook 3
C Copy Outlook contact field value to another field Outlook VBA and Custom Forms 1
J Copy to calendar function no longer working in outlook 365 Using Outlook 5
F Copy and replace not update contact in another pst Using Outlook 0
B Outlook Business Contact Manager with SQL to Excel, User Defined Fields in BCM don't sync in SQL. Can I use VBA code to copy 1 field to another? BCM (Business Contact Manager) 0
Commodore Folders always closed in move/copy items dialog box Using Outlook 3
N Outlook rules don't create a copy for bcc'ed emails Using Outlook 3
geofferyh Outlook 2010 How to Copy Outlook Attachment to a Specific Folder? Outlook VBA and Custom Forms 3
S Custom Form, copy user field data to message body Outlook VBA and Custom Forms 12
R Copy Outlook Public Folders to a File Server Shared Folder Using Outlook 0
K Outlook Rules: Move a Copy Using Outlook 4
oliv- HOW TO COPY /USE FOLDERS ICONS Outlook VBA and Custom Forms 2
E Copy e-mail body from outlook and insert into excel Outlook VBA and Custom Forms 3
B Copy/Move Exchange inbox to Pop inbox Using Outlook 4
R Sending email copy (*.msg file) of sent email if subject line contains specific string. Outlook VBA and Custom Forms 1
O Copy mails from many subfolders to 1 foldr Using Outlook 2
K ind specific Subject line from outlook and copy the content of the email body to exce Outlook VBA and Custom Forms 0
K How to find specific header and copy the mail body Using Outlook 0
J Copy or Export Outlook Mail to Excel Outlook VBA and Custom Forms 6
G Copy Contact field to Appointment Custom Form Field Outlook VBA and Custom Forms 2
G How to Copy Multi Select Listbox Data to Appointment Outlook VBA and Custom Forms 3
Carrie Dickey Outlook 2016 created two calendars titled Calendar1 - appear to be a copy Using Outlook 2
P How to copy and append data from Outlook 2016 message into Excel 2016 workbook Using Outlook 0

Similar threads

Back
Top