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

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
Address 2
Post code
 needs to be
Name, address1, address2, postcode, etc, ect

Any ideas?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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: ,
Second thoughts. Perhaps a comma, followed by a space would look better
joolsw39Author Commented:
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!
CEOs need to know what they should worry about

Nearly every week during the past few years has featured a headline about the latest data breach, malware attack, ransomware demand, or unrecoverable corporate data loss. Those stories are frequently followed by news that the CEOs at those companies were forced to resign.

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.
joolsw39Author Commented:
Many thanks for you help - I really wanted to avoid VBA, however mailmerge will not work for what I require.
What mechanism are you using to insert the text?
joolsw39Author Commented:
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
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?
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.
joolsw39Author Commented:
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
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.
joolsw39Author Commented:
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!
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
joolsw39Author Commented:
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
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:


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
joolsw39Author Commented:

I have worked through and this is seems to be what I need - so many thanks!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.