Re: run-time error '5922' and csv files
From: Dominic Godin (nospam_at_plz)
Date: 08/27/04
- Next message: Anna: "Parameter queries aren't available for merging"
- Previous message: Ellen: "Re: Merge field formatted as % retains decimal"
- In reply to: Cindy M -WordMVP-: "Re: run-time error '5922' and csv files"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 27 Aug 2004 08:38:24 -0700
Thanks for the reply.
I managed to fix it in the end. Apparently Word has some nasty bugs
with certain versions of the ODBC. I switched the file extension from
csv to dat so word wouldn't use the ODBC and now all works fine.
Thanks
Dominic Godin
Cindy M -WordMVP- <C.Meister-C@hispeed.ch> wrote in
news:VA.00009e1b.004aeba0@speedy:
> Hi Dominic,
>
> When picking up a text file in Word 2000 (note _2000_, not 2002 or
> 2003 - this is important!), Word has the choice of using ODBC or its
> internal text converter. Given your macro code, I'd assume Word will
> try to use the text converter (you don't specify a DSN or anything of
> that sort). That should be present on every machine and not cause a
> problem. OTOH, I don't know anything about metaframe, either, so I
> don't know how/whether it might be interfering.
>
> The first thing I'd test, is whether this file can be opened in the
> UI. If it can, then someone should record a macro while doing so, so
> that you can compare the OpenDataSource code and see what kind of
> connection Word "wants" to use.
>
> My personal feeling is that this metaframe may somehow be blocking
> Word's access to the external file.
>
>> 'Set object reference to this mail merge (convenience coding)
>> Set thisMerge = ThisDocument.MailMerge
>>
>> 'Setup the mail merge datasource
>> With thisMerge
>> 'Set the merge type
>> .MainDocumentType = wdFormLetters
>> 'Set the data source information. Falls over here!!
>> .OpenDataSource name:= "C:\Temp\batchmerge.csv"
>> .SuppressBlankLines = True
>> .execute
>> End With
>>
>> The file batchmerge does exist and isn't corrupt. This works for
>> most of our clients. The client it falls over on is using metaframe
>> and word 2000. I get the error can not open data source. Is this
>> due to ODBC settings or something. I know little about metaframe but
>> our engineer says that the user can see C:\Temp\batchmerge.csv.
>>
>
> Cindy Meister
> INTER-Solutions, Switzerland
> http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
> 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 :-)
>
>
- Next message: Anna: "Parameter queries aren't available for merging"
- Previous message: Ellen: "Re: Merge field formatted as % retains decimal"
- In reply to: Cindy M -WordMVP-: "Re: run-time error '5922' and csv files"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|