View Single Post
  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default AddressLayout not working

ander163 wrote:
It is truly amazing to me that the designers make it so hard to
insert an address from Outlook Contacts into a letter in Word. Take
an address - insert it into a letter. For me, this is one of the
most used functions of the word processor. Gone in Word 2007 is the
short list of 10 or so most recently used names - that was useful.


Interestingly the short list of names is still attached to the address book
function that is part of the envelope tool.


First the Address Book function is buried and has to be added to the
Quick Access Toolbar - but I admit that complaint is true of a
majority of the Word functions.


I am pretty sure that it was never available by default in any previous
version. I seem to recall adding it to my own toolbars in earlier versions.
But you are right about it being buried in 2007.

Second, the formatting of the
address block using fields is also hidden (good job with your
explanation, Graham) and not easily found in Microsoft support
materials. And now the formatting definition is only followed
"sometimes". I'm using Word, I'm not checking it for bugs or
deciphering how it works. My experience is that once you do insert
the Address_Layout quick part into the document, then delete it, all
addresses that are inserted will format following that definition.
It seems to work in new documents until Word is closed, so it is a
one-time function each time you re-start Word. Until then, addresses
come across with only NAME, STREET, CITY-State-ZIP, COUNTRY fields.


If you add AddressLayout in the format

{PR_GIVEN_NAME PR_SURNAME
}{PR_COMPANY_NAME
}{PR_POSTAL_ADDRESS}

Copy the above to Word, select and press ALT+F3 then save it as an autotext
entry in normal.dotm - then make sure normal.dotm is saved when you close
Word it will hold over a restart.


My Address_Layout Quick Part is defined as a QuickPart, not an
AutoText, because when I defined it as an Autotext initially it had
no effect. Perhaps the problem was not the definition as Autotext
(instead of Quick Part), but instead this other functional problem
discussed herein.


It should be named AddressLayout, though if you tell me that Address_Layout
works I will accept that as another anomaly.

Finally, Graham, I need to pick and insert many addresses from
Outlook into a document, so I cannot add a macro to the document to
grab the Outlook address, as elegant as your macro is. Instead, I
think I would have to have a macro that adds your macro, then execute
your macro each place and time I need to insert and address into the
word document I am creating.


You could add the macro to your QAT and it will insert the address at the
cursor position. You can easily change how the macro formats the address
inserted.

For example, the document says:

The foregoing was mailed this date to:

After which I have to insert between 1 and 5 (or more) names and
address blocks.

Thanks, all for confirming it was not just my computer, my system, and
new-user mistakes.

It's a steep learning curve for all of us well versed in the old way of
doing things. I really don't know what Microsoft was thinking. However as
others have said, it does get easier with familiarity.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org