Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File in Use Question
Message
 
À
14/09/1998 11:25:19
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00135468
Message ID:
00136224
Vues:
16
>>>>>>>>Using vfp6.0
>>>>>>>>
>>>>>>>>I have a program that creates a .dbf file (fox2 format) to be used by MS Word for mail merge. Everytime a user creates labels, it also issues a 'copy to myMrgFile type fox2'. My .exe file never opens the file. But --- heres a scenerio I am expecting:
>>>>>>>>
>>>>>>>>1) User has my .exe and MS Word open.
>>>>>>>>2) User is in the middle of a mail merge and notices names are missing.
>>>>>>>>3) User switches to my vfp .exe and pulls another query.
>>>>>>>>4) Vfp .exe file attempts to 'copy to myMrgFile type fox2' but since Word has it open - it fails.
>>>>>>>>
>>>>>>>>I am dealing with very elderly people, most of which do not know how to use mail merges. I don't want to use a putfile().
>>>>>>>>
>>>>>>>>Question:
>>>>>>>>How can I find out if myMrgFile.dbf is open by another program (not necessarily Word)?
>>>>>>>>
>>>>>>>>Robert
>Snip...
>>Cetin,
>>
>>Actually, I thought Word would read a old fox dbf file and when I tried to mail merge it, I found out it doesn't support it. I then changed the file I am checking for to a excel file format, therefore your fopen() example works fine. I'll incorporate the ferror() into it though.
>>
>>Robert
>Robert,
>Now we came to a point that we should have talked at the start. You're using VFP and Word95 or 97 right ? If so, word reads DBF, via ODBC or directly. Or you could export to Excel and use it etc. If dataset is not very crowded alternatives might exist and it could even be a native word.doc. I should understand something at this point clearly : Does your dbf should exactly have one same name "myMrgFile" for all users ? Or even should it exist at all ? How do they do mailmerging ? Open the datasource themselves or just using "Insert merge field" button on toolbar ?
>Cetin

Cetin,
The users of my software are very old, 70+ years. ODBC is not the way to go. Using excel, or maybe I should think of a delimited file, would be much better. I'm thinking most will use Word 95 or 97 but I can't guarantee that either. I want them to simply use the 'Insert Merge Field' thinking this would be the easiest for them. I'm not going to support this anyway. Only give them the location and the name of the file. If they know how to create a merge, then fine. I don't want to be on the phone with these gentlemen for extended periods time.

P.S.
Maybe, when I installed Word, I didn't put in all the filters. DBF did not show up as one of the options for the merge records, I don't know.

I guess it boils down to, should I use .xls or delimited text file? I picked .xls but I'm having second thoughts.

Robert
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform