Setting a default datasource location

J

Junior

Access2K word 2K and 2K3
I developed an MSAccess program that creates txt files, sends them to
C:\Myfolder, then opens mailmerge documents
The mailmerge documents are also in C:\MyFolder and use the txt files as
their datasource.
We have been able to install all files on a New Users workstation in
C:\MyFolder and the mailmerge links remain intact.

Now, I have a delema because the network is changing and the Access program
and mailmerge documents will be moving to
C:\Documents and Settings\username\My Documents.
and the MSAccess program will be sending the datasource txt files to
C:\Documents and Settings\username\My Documents.

I know mailmerge Docs will open and ask the user to browse for the
datasource, but our users will not know how to do this.
Is there a way to instruct the Mailmerge documents (vba or macro) to find
the data source txt files at this new location?
Keeping in mind that the location will be dynamic - i.e. depends on the
username.

One more issue - one of the mailmerge documents has a paragraph that prints
a list based on below code.

{ INCLUDETEXT "C:\\MyFolder\\Missing.txt" \* MERGEFORMAT}



Thanks of any help, advice.
 
J

Junior

Ok - did some experimenting and reading, it appears that My Documents is the
user's default folder
and the mailmerge documents seem to be finding their datasource (on my home
PC ) when both the source file and merge file are in My documents.
would i be correct in assuming that this would work for any user as long as
the source file and merge document are in his/her 'My Documents' folder?
 
G

Graham Mayor

If the merge documents are in the same folder as their data sources the
merge documents should find their data files without further interference
(provided there is not a file of similar name in the c:\MyFolder folder).

As for the INCLUDETEXT field - remove the path from the filename and if that
document is in the same folder as the merge document it will find that too,

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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