• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 348
  • Last Modified:

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

Any ideas?
Thanks
test-document.docx
0
joolsw39
Asked:
joolsw39
  • 9
  • 7
1 Solution
 
GrahamSkanCommented:
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
 
GrahamSkanCommented:
Second thoughts. Perhaps a comma, followed by a space would look better
0
 
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!
0
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

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

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

Featured Post

Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

  • 9
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now