Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Another Mail Merge question...

Status
Not open for further replies.

eclipse33

Programmer
Apr 13, 2001
94
CA
Hi,

I am opening a mail merge document from a button in Access. I created the mail merge document in Access and used a pre-built query as the data source for the mail merge. The query has two parameters passed to it...starting date and ending date that are taken from two text fields on the form.

Here is the code of on the button click

newWordFile = "C:\Lans\ConfirmationLetter1"
retValue = Shell("C:\Program Files\Microsoft Office\Office\WINWORD.EXE " & newWordFile, 1)


Ok...now the mail merge works fine on my local machine but if I copy the database and the word document (same folder) to another workstation....I get a "Can't find Data Source" error for the word doc.

Anyone know why? [spin]

Thanks
eclipse33

 
The path for the file is probably not correct anymore. When you move the files the location C:\Lans\ConfirmationLetter1 isn't correct.
 
Hey Jim

Why? I created a folder with the same name on the workstation?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top