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
310 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
  • 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
 
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now