Getting addresses from Outlook Contacts for Envelopes & Labels

S

sbrager

I have Office 2007 and I've created a letter in Word to an old friend and I
wanted to create an envelope with his name and address. His name and address
is in Outlook's Contact list. However, oll that Word gets from the Outlet
Contact list is his name. I've also tried creating a label with the same
results.

Office 2007 is current with Microsoft's updates.

Thanks;

Stan
 
S

sbrager

Thanks, Doug. While the slipstick site advice is good, it doesn't apply to
Word 2007 (although it would probably work). Microsoft's help doc for
Envelopes and Labels in Word 2007 states the following:

"If you want to use an address in the electronic address book installed on
your computer, click Insert Address."

Furthermore, other online references also give the same advice.

Stan
 
G

Graham Mayor

The principles covered in the slipstick link and simplified at
http://www.gmayor.com/Macrobutton.htm will work for 2007, however the
default setting should insert the address. The fact that it doesn't suggests
there may be a problem with the Outlook data file, which occasionally
happens when converting between versions.

Open Outlook and set the contacts view to 'Detailed Address Cards'. Does the
address that you have tried to enter appear in full? If not open the record
and save it. Does it appear now? If that has fixed it for that record,
create and run the following macro in Outlook which will open and save all
your contacts in the same manner. Outlook's vba editor is not identical to
Word's on which the following page is based, but the principles of copying
macros from listings are the same -
http://www.gmayor.com/installing_macro.htm


Sub ResaveContact()
Dim objOL As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objContactFolder As Outlook.MAPIFolder
Dim objContact As Outlook.ContactItem
Dim objItems As Outlook.Items
Dim obj As Object
Dim strName As String

On Error Resume Next

Set objOL = CreateObject("Outlook.Application")
Set objNS = objOL.GetNamespace("MAPI")
Set objContactFolder = objNS.GetDefaultFolder(olFolderContacts)
Set objItems = objContactFolder.Items

For Each obj In objItems
'Test for contact and not distribution list
If obj.Class = olContact Then
Set objContact = obj

With objContact
.Display
.Close (olSave)
End With
End If

Err.Clear
Next

Set objOL = Nothing
Set objNS = Nothing
Set obj = Nothing
Set objContactFolder = Nothing
Set objContact = Nothing
End Sub


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top