Hi =?Utf-8?B?U2VyZW5h?=,
> I have an existing Word 97 document which uses an Access 97 database as its source. The document is called (via a Call Shell command) from Access code on a form and then the code in the Word merging macro uses a hard-coded ChangeFileOpenDirectory command to set the directory for saving the merged document.
>
> I would like to change this code so that, regardless of which directory the document and database reside in, the Word macro can pick up the current directory of the document, and look for its datasource and save the merged file in the same directory.
ActiveDocument.Path
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-)
Serena - 10 May 2004 21:28 GMT
Thanks for your assistance, that has worked nicely.
>-----Original Message-----
>Hi =?Utf-8?B?U2VyZW5h?=,
>
>> I have an existing Word 97 document which uses an Access 97 database as its source. The document is called
(via a Call Shell command) from Access code on a form and
then the code in the Word merging macro uses a hard-coded
ChangeFileOpenDirectory command to set the directory for
saving the merged document.
>>
>> I would like to change this code so that, regardless of which directory the document and database reside in, the
Word macro can pick up the current directory of the
document, and look for its datasource and save the merged
file in the same directory.
> ActiveDocument.Path
>
[quoted text clipped - 4 lines]
>
>This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-
mail :-)
>.