View Single Post
  #9   Report Post  
Posted to microsoft.public.word.mailmerge.fields
thomasv thomasv is offline
external usenet poster
 
Posts: 4
Default How to access the Outlook Address book from Word for mail merg

Well, I have Office 2003 so thay maybe explains why I did get some access.
One thing I don't understand is why I can access GAL when using the Evelopes
& labels wizard, but not when using mail merge.
We do have Sharepoint, InfoPath and a lot of other MS systems in the house,
so perhaps by using them instead, we'd be able to get GAL data into forms or
Word documents.

Thanks a lot Peter, I really appreciate your help!

Thomas

"Peter Jamieson" wrote:

Is it thus not possible to easy have direct access to the Global address
list from Word?


Not as far as I know. People ask about it from time to time. The reality is
that Word does not have very good access to address data in general -
although I think we can assume that this is /now/ deliberate security policy
to prevent address data from being too easily accessed, earlier it may have
been an accidental consequence of the fact that MAPI data is hard to get at.
Similarly, although you /can/ get at Outlook contact data from Word, the
process uses an unmaintained approach and it is usually far better to start
from Outlook.

In essence, Word gets data from Outlook and Address books using the Jet
(Access) ODBC driver/OLE DB provider, which can work with data from a number
of different types of data source using plugins called IISAMs (there's one
for Excel, one for dBASE, and so on). As far as I can tell, the
Outlook/Exchange IISAM may have been dropped altogether from Jet's Office
2007 successor, ACE (although you still seem to be able to get at this data
on Office 2007 systems using Jet).

Previously, I'd never been able to work out a way to get Word to work
"directly" with this IISAM. The best I could do was to create an Access
database and create a linked table to the GAL, and possibly a query to
retrieve all the rows from that table. That's also an approach that you can
consider, particularly since you may need a query to select "real" address
data (the GAL also contains account data for Windows domain administrative
accounts etc. - i.e. not human users). So I was a bit surprised to make a
..odc that actually works.

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

"thomasv" wrote in message
...
Thanks Peter,

I haven't tried this yet, but will later on. As our organization has a
quite
rigid security setup, it may though not function. If it does, we would
also
somehow have to deploy it to tens of users.

Is it thus not possible to easy have direct access to the Global address
list from Word?

Thomas

"Peter Jamieson" wrote:

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