a. DDE
b. I don't know how to specify the UNC in Word. I only know how to connect
with the Mail Merge Helper ( I hate helpers/wizards, its just that I don't
know another way to link the db to the word doc.)
c. How do I connect programmatically in Word?
OK, I can't check in Word 2000 right now, but the following works OK on WOrd
2003 on a WinXP box:
(b)
When you get to the Open Data Source dialog box, type in the UNC name (i.e.
don't try to select the .mdb file from a list). e.g. I just used
\\Myserver\netshare\a.mdb
However, I have a feeling that there may be more to it than that in Word
2000, e.g. you may have to take account of
http://support.microsoft.com/kb/313551/en-us
> c. How do I connect programmatically in Word?
Issue an OpenDataSource call, e.g. with your mail merge main document open,
use
Sub COnnectToMyDB()
ActiveDocument.MailMerge.OpenDataSource _
Name:="\\Myserver\netshare\a.mdb", _
Connection:="TABLE mytable", _
SQLStatement:="SELECT * FROM [mytable]"
End Sub
See http://word.mvps.org/FAQs/MacrosVBA/CreateAMacro.htm
if you're unfamiliar with creating VBA code.
Peter Jamieson
> a. DDE
> b. I don't know how to specify the UNC in Word. I only know how to
[quoted text clipped - 42 lines]
>> >
>> > Matt
MF Scheetz - 12 Apr 2007 14:52 GMT
Thanks a lot Peter! It works great!
-Matt
> OK, I can't check in Word 2000 right now, but the following works OK on WOrd
> 2003 on a WinXP box:
[quoted text clipped - 76 lines]
> >> >
> >> > Matt