A few questions:
a. can I just clarify this:
> We are accessing the same doc from the shared drive,
So you both use the same .doc on a shared drive, but...
> data source is a
> *.csv on C:\.
...you each have your own copy of the data? If you each have your own copy,
is the content identical or different?
b. is the data file in c:\ or deep down in the folder hierarchy on c: ?
c. what creates this .csv, and at what point before you perform the merge
(i.e. could something else be locking it?)
d. if you can, after you have successfully opened your data source, could
you please either open the VB Editor (Word Tools|Macro), open the Immediate
window if necessary (ctrl-G), and type
print activedocument.mailmerge.datasource.name (then <enter>)
and post the result here. Ditto for
print activedocument.mailmerge.datasource.connectstring
and
print activedocument.mailmerge.datasource.querystring
Can your colleague please try the same on her system when she has managed to
connect.
I suspect it may be irrelevant, but does either of you have a file called
SCHEMA.INI in the same folder as the .csv file?
Peter Jamieson
> When I open a particular merge doc on my computer it connects
> automatically to the data source, as it should. On a co-worrkers
[quoted text clipped - 15 lines]
>
> Thank you very much.
pam dmonium - 16 Mar 2007 18:35 GMT
Peter,
I originally setup the document and the data was on C:\ I do not
generally do the merging, she does. So, for testing purposes, I took
a copy of her data file and put it on my c drive. The data file is in
the root, and is an export file from a vendor which she downloads from
their website. After she downloads she closes her browser, so I don't
believe anything is blocking. I have reviewed the file in a text
editor and it appears fine. Also, it merges just fine when I do it.
I tried the debug strings you suggested, and now here is something
odd... The connectstring statement crashes Word on my computer, and on
her computer it doesn't return anything. Here are the other two
strings.
Her
debug.print activedocument.mailmerge.datasource.name
C:\fcmerge.csv
debug.print activedocument.mailmerge.datasource.querystring
SELECT * FROM C:\fcmerge.csv
Me
debug.print activedocument.mailmerge.datasource.name
C:\fcmerge.csv
debug.print activedocument.mailmerge.datasource.querystring
SELECT * FROM C:\fcmerge.csv
We are indeed both connected because when I hit edit data source I see
the eight records from the file.
Neither of us hase schema.ini.
Thank you
Peter Jamieson - 16 Mar 2007 18:50 GMT
OK, I have to say that no obvious problem springs to mind.
What is perhaps worth double-checking is that trying to check
"connectstring" did indeed crash Word, but only in Word 2002 - as far as I
am aware that problem disappeared in Word 2003. That suggests to me that
it's just possible that the setup on your colleague's installation might not
be complete.
Seems like a long shot, but it could be worth
a. comparing the precise version numbers in Word Help|About
b. doing a help|Detect and Repair on your colleague's machine.
Another workaround might be to change the way that Word connects to these
.csv files - there are various conversations going on at the moment in this
group about possible ways to do that. (BTW I'll be away for a while in a day
or two so if there's follow-up I'll only be able to deal with it after
that).
Peter Jamieson
> Peter,
>
[quoted text clipped - 29 lines]
>
> Thank you
pam dmonium - 16 Mar 2007 19:45 GMT
After spending way more time on this than I should have, I finally got
it to work. Although I have no idea why what I did works.
I tried renaming the data source file, but that didn't fix it. So I
moved the file to the same directory as the merge doc itself. I
reconnected and saved and now when she opens the file, voila! it
connects. It is annoying as it should have worked with the data file
on c. But who am I to question.
Thank you, Peter, for you help. Have a nice weekend.