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.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
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.
 

Rick Luke

New Member
Outlook version
Outlook 2013 32 bit
Email Account
POP3
...
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.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Hmmm. a simple macro with a msgbox should work... should even be able to send the address to the clipboard.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
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
 

Rick Luke

New Member
Outlook version
Outlook 2013 32 bit
Email Account
POP3
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.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
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.
Thread starter Similar threads 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
S I'm not able to copy and paste on outlook. Using Outlook 1
M Outlook 2007 Copy-Paste problems Using Outlook 6
F I cannot highlight text in Microsoft Outlook 2010 e-mails, and copy/paste to the body of another e-m Using Outlook 3
J cannot copy and paste while in list view in-cell editing Using Outlook 1
J How to copy and paste in Outlook 2010 ? Using Outlook 3
S Copy/Paste from Office Word 2003 to Outlook 2003 Using Outlook 3
J OWA copy/paste and drag/drop Question Exchange Server Administration 2
D Problem with Microsoft Office 2010 Clipboard (Copy and Paste) Using Outlook 1
O How do I copy and paste calendar dates in 2010 outlook? Using Outlook 1
I Office 2003 Crashes when trying to Copy, Paste, or Save with Windows 7 Professional Using Outlook 4
R how to copy a list of email contacts and paste them only as names (not names + email address) Using Outlook 12
C Copy Paste Using Outlook 2
N Outlook 2007 - Attachment Copy/Paste issue Using Outlook 1
N User is trying to COPY and PASTE text document in outlook. But the output of copied text is an image. Using Outlook 5
J Copy/paste in outlook & pasted text is in html Using Outlook 17
T Cut and paste problems - I copy from internet / word but info does not appear on clipboard, so I can Using Outlook 4
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
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
B 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
Similar threads


















































Top