problem file lock on merge

F

fry

Bonjour ,

Je pilote word 97 au travers d'une application VB6.

Je lance une cession word

J'ouvre un document (word.doc) word et je réalise une fusion avec (word.txt)

J'enregistre mon document fusionné.
Je ferme mon document

Si je fais ce traitement plusieurs fois j'obtiens un message d'erreur a la
lecture de mon fichier de données (erreur 70 permission refusée).

c'est en fait word qui s'est approprié mon fichier car si je ferme la
fenetre word je n'ai plus de problèmes pour acceder a mon fichier.

Pourtant la fenetre word est bien vide !


Merci de votre aide.
Ah oui ce problème se présente sous office 97 office XP sous windows XP et
sur server 2000.

Tous les produits ont les derniers update.
 
C

Cindy M -WordMVP-

Hi Fry,

I'm going to answer here because, if I follow correctly, this problem
description contains an important bit of information missing in the English
version :)

You perform the process numerous times, and at some point, Word is saying 2hte
file is locked". Yes?

This is, and has always been, generally an issue with Word: you can never be
quite certain when it will release a file that it has once accessed. I'd say
the quickest and easiest thing to do in the long run would be to trap this
error when it occurs. You can either loop until Word finally releases it,
close and re-open Word, or create a new text file with an incremented name and
attach that as the data source. (And at some point, your application can check
for and delete "old" word.txt files.)

You may find other ideas in one of the word.vba newsgroups. Be sure to
emphasize that the problem is with Word locking a file, and not with mail
merge, per se.
Je pilote word 97 au travers d'une application VB6.

Je lance une cession word

J'ouvre un document (word.doc) word et je réalise une fusion avec (word.txt)

J'enregistre mon document fusionné.
Je ferme mon document

Si je fais ce traitement plusieurs fois j'obtiens un message d'erreur a la
lecture de mon fichier de données (erreur 70 permission refusée).

c'est en fait word qui s'est approprié mon fichier car si je ferme la
fenetre word je n'ai plus de problèmes pour acceder a mon fichier.

Pourtant la fenetre word est bien vide !

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
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 :)
 
F

fry

hi cindymeister,

thank's for answer.
You have understand my question.
it's the file use in my vb application when i do my document.mailmerge that
stay lock.

Closing word is a good idea.But it become very slow whn i make 8000
documents.

For information,

I have find a solution for office 97 searching in the kb Microsoft , i put
the patch sr2 and i have no longer problem with office97.

the problem stay on office XP and i have all the patch sp1 and sp2.

we can see this problem at
http://support.microsoft.com/default.aspx?scid=kb;EN-US;151020

and

http://support.microsoft.com/default.aspx?scid=kb;EN-US;163367

But i search a solution for office XP .

thank's for help
 
C

Cindy M -WordMVP-

Hi Fry,
Closing word is a good idea.But it become very slow whn i make 8000
documents.
Understandable :) OTOH, if you could test that file, to find out
whether it's been locked, you would only have to close and restart
Word for those (hopefully few) occasions?

As I said, otherwise you should try checking in the word.vba groups
whether someone there has any good ideas about how to get around the
problem (it's not only a problem with mail merge!)

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
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 :)
 

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

Similar Threads


Top