View Single Post
  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default How to access the Outlook Address book from Word for mail merging

NB, there should be a /body line in that chunk of code, i.e. the end of it
should look like

/xml
/body
/html

(Word does not appear to care but there you go).
--
Peter Jamieson
http://tips.pjmsn.me.uk

"Peter Jamieson" wrote in message
...
I think this is pretty unlikely to work, but you can try it anyway (it
works here, but I can think of several reasons why it would not - primarily
security-related).

Create a folder (say c:\a)

Create an Access .mdb called gal.mdb in there.

Don't have Access? Then you can create a .mdb in Word as follows:
a. Start the Mail Merge Wizard, get to the point where you select a data
source, then select "Type a new List" and click Create.
b. type one letter into the Title field in the form, delete the letter,
then click Close. Click Save in the dialog box that appears. Save the file
with name gal.mdb in the usual way.

Find out the name of the Outlook Profile you are using. I think you should
be able to do this by going into Windows Control Panel-Mail-Show
Profiles

As far as I know, the default in Office 2003 is "Outlook", but it isn't
something I know a lot about.

Open Notepad and copy the following text into it, starting with the html
line and ending with /html

html
head
meta http-equiv=Content-Type content="text/x-ms-odc; charset=utf-8"
meta name=ProgId content=ODC.Table
meta name=SourceType content=OLEDB
meta name=Table content="Global Address List"
xml id=docprops/xmlxml id=msodcodc:OfficeDataConnection
xmlnsdc="urn:schemas-microsoft-comfficedc"
xmlns="http://www.w3.org/TR/REC-html40"
odc:Connection odc:Type="OLEDB"
odc:ConnectionStringProvider=Microsoft.Jet.OLEDB .4.0;Data
Source=c:\a\gal.mdb;Mode=Share Deny None;Extended
Properties="Exchange 4.0;PROFILE=Outlook;TABLETYPE=1;TABLENAME=Global
Address List;";Jet OLEDB:Engine Type=48;/odc:ConnectionString
odc:CommandTypeTable/odc:CommandType
odc:CommandTextGlobal Address List/odc:CommandText
/odc:Connection
/odc:OfficeDataConnection
/xml
/html

If your Access database isn't called c:\a\gal.mdb, modify the Data Source=
value accordingly.
If your Outlook profile isn't called "Outlook", modify the PROFILE= value
accordingly.

Save the file as (say) gal.odc in your "My Data Sources" folder

Create a new mail merge main document. When you select the data source,
choose gal.odc.

I would be interested to know if that works for you.

Even if does, I would use this approach with caution. If it doesn't work,
sorry, but I doubt very much that I will be able to work out why!

Incidentally, a .odc file normally has quite a lot more stuff in it. It
isn't needed to connect Word to a data source, but it does have its uses
if, for example, you want to inspect the data source using Internet
Explorer.

--
Peter Jamieson
http://tips.pjmsn.me.uk

"thomasv" wrote in message
...
Hi,
I would like to access the Outlook 2003 global Address book from Word
2003
to be able to do some mail merging. When I use the mail merge wizard, I
can
though just use Contacts from Outlook, not the global Address book.

Is there thus any way to access the global Address book for mail merging,
either from Word or from Outlook?

Copying all info from Address book to Contacts would probably not be a
good
option, we have 5000 - 15000 contacts, haven't though counted them...

Thomas