What format is the data file? .txt? .csv? etc. If it is a .txt file, what
field delimiter and record delimiter are you using?
Also, if you do the merge manually in Word 97 using the same data file, does
the merge work, or do you see the same error?
Are you calling an OpenDataSource method? If so, what are the parameters? If
not, can you tell us the values of
(the document object).ActiveDocument.Mailmerge.DataSource.Name
(the document object).ActiveDocument.Mailmerge.DataSource.QueryString
(the document object).ActiveDocument.Mailmerge.DataSource.ConnectString
Peter Jamieson
If it is a delimited format such as .txt, there can be a problem because in
some cases Word uses an internal converter to read the file, and in other
cases it uses ODBC.
Hi Peter,
a) It is a *.txt file
b) Example for such an txt-file:
"Dokumentnummer","User","UKurzzeichen","UTelefon","UTelefax","UEMail","Unternehmensart","IDBeduerftiger","IDPfleger","IDBeziehung","IDTatsaechlichePflege","OB1","OB2","Rentenversicherungsnummer","IDPflegerExtern","Geschlecht","Zuname","Vorname","Titel","Vorsatzwort","Strasse","Hausnummer","Land","PLZ","Wohnort","AntragVom","Ablehnungsgrund","AblehnungAb","BedGeschlecht","BedVorname","BedZuname","BedTitel","BedVorsatzwort","Amt","Betreuung"
2,"Admin","Adm","+49 700 salutaris","+49 69
791237770","SoSiP@salutaris.com",1,533,620,749,1084,"583488CK5703","0100/PVN","42041041L503","","2","Pfleger620","Renate","","","Pflegerstraße","620","","50000","Köln","9.5.2004","14","23.3.2004","1","Günter","Bedürftiger533","","","",""
c) I don't see it - only some users; this problem does not exists at the
development PC's.
d) See this coding:
With mobjWordDocument.MailMerge
.MainDocumentType = wdFormLetters
.OpenDataSource Name:=gsWWUserdatei, Format:=wdOpenFormatText,
ConfirmConversions:=True, ReadOnly:=True
.Destination = wdSendToNewDocument
.Execute (True)
End With
We thought, that "Format:=wdOpenFormatText, ConfirmConversions:=True," could
solve this problem - but it don't.
Some ideas?!?
Ralf
> What format is the data file? .txt? .csv? etc. If it is a .txt file, what
> field delimiter and record delimiter are you using?
[quoted text clipped - 31 lines]
> >
> > Danke!
Peter Jamieson - 25 Jul 2005 21:57 GMT
Hi Ralf
One possible problem is that Word can use two different mechanisms to
connect to .txt data
(1) its internal text converter
(2) ODBC
In some cases Word will try to use ODBC even when you do not specify it in
the OpenDataSource call, and in those cases it can fail.
If you can use one of the machines that fails to test changes, I would
consider the following:
a. Determine whether ODBC is installed on that machine, whether the Text
Driver is installed, and whether there is a Text DSN.
b. try changing the .txt file extension to .dat or
c. use the ODBC administrator to set up a schema.ini file that specifies
that the file is comma-delimited with a header line (if necessary you can
try this on your own system, see the schema.ini that is created, edit it in
notepad and copy it to the test machine)
> We thought, that "Format:=wdOpenFormatText, ConfirmConversions:=True,"
> could
> solve this problem - but it don't.
Many of the parameters to OpenDataSource do not do anything at all in most
cases, even when they sound as if they should. Usually, only Name,
Connection, SQLStatement, SQLStatement1, and in Word 2002/2003, Subtype
actually have any impact.
Peter Jamieson
> Hi Peter,
>
[quoted text clipped - 66 lines]
>> >
>> > Danke!
Ralf Dreckmann - 26 Jul 2005 07:42 GMT
Hi Peter,
thanks for the hints. I will try them and come back later ....
Ralf
> Hi Ralf
>
[quoted text clipped - 97 lines]
> >> >
> >> > Danke!
Ralf Dreckmann - 28 Jul 2005 18:27 GMT
Hi Peter,
this was the right tip. The result is:
a) when the ODBC-Driver for the txt-file (who will use this?) is erased - it
works!
b) when the data-file is not named as a txt-file - it works, also when the
ODBC-Driver is installed.
Thanks a lot
Ralf
> Hi Ralf
>
[quoted text clipped - 97 lines]
> >> >
> >> > Danke!