Word merge using sharepoint lists directly?

S

Søren Dalhoff

Is it possible to merge word directly using sharepoint data list, without
exporting the sharepoint data into excel and then merging with excel?

Microsoft Windows Small Business Server 2003, Premium Edition
Office 2003
 
P

Peter Jamieson

If you are still interested in this, I believe it is possible to merge from
a Sharepoint list using a linked table in Access, but it's tricky to set up.

However, to do that, you need Access on your system and you need to link to
the relevant Sharepoint list(s). Also, you will probably find that Word does
not "see" the linked tables when you try to link to the Access database, but
I believe it will correctly use them if you issue the correct SQL in a VBA
OpenDataSource command.

I believe it should be possible to create an Access .mdb and the appropriate
linked tables programmatically using ADOX (even if you haven't got Access on
your system) but even that is tricky because
a. you need to find out the "internal" name of the Sharepoint list in order
to create the linked table. There are apparently ways to do that
programmatically but I haven't explored them yet. The simplest way is to use
Access to create the link and examine the resulting table's properties, but
of course that means you have to have Access (although you could probably
distribute the resulting .mdb to non-Access systems)
b. The correct VBA to do this still eludes me

Peter Jamieson
 
S

Søren Dalhoff

Not sure why I should use Access because the sharepoint is running on SQL.
Do you have any link or doc on how to setup?

Søren Dalhoff
 
P

Peter Jamieson

Not sure why I should use Access because the sharepoint is running on SQL.

Have you tried linking directly to the SQL Server database with the
Sharepont info. using either ODBC or (probably better) OLEDB? I managed to
do that here a while back, but as far as I can remember the default
permissions for the relevant SQL Server database do not allow it so you
might have to alter them (and maybe you cannot do that).

The reason for suggesting Access is simply that it's easier to do it and I
know it is feasible. In fact, it's slightly easier than I thought. The
procedure is as follows:
a. create a new blank database
b. navigate to File|get External Data|Link tables
c. In the "Files of type" listbox, select Windows Sharepoint Services ()
d. Enter the site address and take it from there. There is an option to
link to more than one table so that lookup items are also available in
Access.
e. If you try using these linked tables as data sources in Word, I don't
think Word will "see" them, but if you create a query in Access that gets
all the items for a linked table, Word seems to "see" that and you should be
able to use it as a data source.

Peter Jamieson
 
P

Peter Jamieson

b. The correct VBA to do this still eludes me

Not any more...

Peter Jamieson
 

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