Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mail Merge in VFP7
Message
De
05/06/2003 09:40:12
Steven Herbin
SNH Computing Corporation
Swan Lake, New York, États-Unis
 
 
À
05/06/2003 07:58:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00792391
Message ID:
00796650
Vues:
28
>>Steven,
>>
>>I bought the Automation book and although I was able to use their Merge method, I still have a couple of outstanding issues. First of all, I need a new set of data for each merge, and all I keep doing is adding records to the existing data.
>
>In your code that's doing the merge, use a query to get only the records you want to merge this time and use that as the basis for creating the data source.
>
>>Secondly, I want to automatically save the merged file and preview it, however I'm getting 3 windows - the original main document, the data source, and the preview of the merged document.
>
>You can use automation code to close the others once the merge is done. Your best bet is to make sure you're holding onto object references to the main document and the data source, then closing them is just:
>
>oMain.Close()
>oDataSource.Close()
>
>For the data source, you may actually have to pass a parameter to indicate that it should be closed without saving it.
>
>Tamar

Chaim-

What I am doing (right or wrong), is close verything, then delete the header and data source files, run another query and then start the process all over again.

If you want to save the merged file to a new document, just set the .mailmerge.destination = 0 and then save the document through automation, then preview it (I don't have the book here so I'm not sure of the syntax, but it should be pretty straightforward). If I get a chance before Shavuot, I'll look it up. Otherwise, Saturday night.

--Steve.
Steven Herbin
SNH Computing Corporation
Swan Lake, NY
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform