Solved

Word 2010 - Inserting address from Outlook contacts - formatting is paragraph I need it to be converted to one line?

Posted on 2012-03-13
16
325 Views
Last Modified: 2012-03-23
I am using Word 2010 and would like to set a template up so that the "from" address can be inserted in the header.  I am using Outlook address book for this which is no problem.  However when I insert it inserts it in paragraph format where I need it to be single line
eg
Name
Address1
Address 2
Post code
etc
 needs to be
Name, address1, address2, postcode, etc, ect

Any ideas?
Thanks
test-document.docx
0
Comment
Question by:joolsw39
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 7
16 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 37713976
Select all but the last line and do a Find and Replace (Crl+H), fin din a paragraph mark and replacing it with a comma.

Find: ^p
REplace: ,
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 37713989
Second thoughts. Perhaps a comma, followed by a space would look better
0
 

Author Comment

by:joolsw39
ID: 37714171
Hi thank you for your suggestion, is seems to work ok, however is there anyway that this could be an automated process? I need to have as little use input as possible!
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 76

Expert Comment

by:GrahamSkan
ID: 37715389
It could be, but, it would probably need some VBA, the amount and complexity of which would depend on how automatic you want it.

At its most simple, you would select the address and then run a macro, either from a QAT button or a keystroke.

If the circumstances permit, MailMerge might be an alternative.
0
 

Author Comment

by:joolsw39
ID: 37715957
Many thanks for you help - I really wanted to avoid VBA, however mailmerge will not work for what I require.
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 37717954
What mechanism are you using to insert the text?
0
 

Author Comment

by:joolsw39
ID: 37736711
On the Toolbar on the top is the address book icon - whilst in the Header you click on the address book and then chose the entry required, this then puts in the address, however it puts it in paragraph form, not in single line form which is the format required
Thanks
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 37736995
I only have Word 2007, but I thought that would be close enough. However I can't see the button. Which tab is it on?
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 37737015
If you have a limited number of addresses, you could make each one an autocorrect item to be called up when a unique string is typed, e.g. AP for the address in your sample document.
0
 

Author Comment

by:joolsw39
ID: 37737117
Hi re the address icon, you basically add it to the toolbar by using the quick customized toolbar drop down.  Could you expand on the autocorrect comment please?
Thank you
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 37737703
I expect that the QAT button uses the 'Address Book' command. I wondered if you might have inherited something that already uses VBA.

To use Autocorrect, get the address in the form that you want and select it.
Then find the 'Proofing' set in Word options, and click on the AutoCorrect Options... button. Your text will appear in the With: box. Type your trigger for the particular address e.g. (AP), into the Replace: box and click on OK.

To test, type (AP){Enter} and your address will appear, replacing your typing.

You will have to repeat the process for each address, which is why I said 'limited number'.

The AutoCorrect entries will be stored in the current document's template.
0
 

Author Comment

by:joolsw39
ID: 37743027
Dont think anything from VBA has been inherited at all.
If we use auto correct then it will become quite long winded - and to be honest the users this template is being created for would not really have a clue what to do. Guess its back to the drawing board!
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 37744523
Your company's website lists 52 branches, so that is understandable.

Perhaps you could consider whether a VBA procedure to create the AutoCorrect entries is acceptable, and we could consider whether it it possible
0
 

Author Comment

by:joolsw39
ID: 37746580
HI
If it is fully automated and the user has no input apart from chosing which address they require from the drop down list from the address book then that would be ideal.  I must admit my VBA skill are severely limited though
thanks
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
ID: 37747035
Well, you learn something every day. I have just found that there is an unseen Autotext entry called AddressLayout, so no VBA code should be necessary.

You can write your own to override the hidden default layout.

This is done by typing your preferred layout with property items like  {<PR_SURNAME>} and {<PR_STREET_ADDRESS>}. Select the layout text and do Insert tab> Text group>'Quick Parts' dropdown>'Save Selection to Quick Part Gallery' item to open the 'Create New Building Block' dialogue.
Make the Name: AddressLayout, and choose AutoText as the gallery. You can type in a description if you want. Click OK and Yes if asked if you want to redefine the item.

There is a full list of property items in the advice here. It is for Word 2000, but most of it still applies, including the list itself:

http://support.microsoft.com/kb/212345/EN-US
0
 

Author Comment

by:joolsw39
ID: 37756465
Hi

I have worked through and this is seems to be what I need - so many thanks!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question