Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automating a mail merge
Message
 
À
09/02/2007 00:43:33
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01193945
Message ID:
01194027
Vues:
22
Asking for trouble, yeah, good one. :~)

Could you fill me in on this idea - it's a bit sketchy.

I have run into some issues with TS. The other day I made a small change to this app and broke something. No problem - easy fix. Or so I thought. When I couldn't get the app to behave again, I was blaming it on myself, but after awhile I realized things were just too screwy. I finally decided we needed to reboot the server when I opened up the form that handles all this, made a small change, then clicked the close button and answered "Yes" to the save question. It said "invalid path or file name". I cleared that and clicked the close button again and it said "file is not open." This went on even after quitting VFP (actually I had to End Task on it) and restarting it. Rebooting the server solved the problems we were having. TS just seemed to have gone squirrely on me.

>Hi Russell
>
>You may consider something I at first didn't think would be a good thing.
>
>Create a vfp monitoring program on the client's PCs. Have the terminal server send the data to a table on the client PC. Have the client PC do the merge and printing.
>
>A terminal server trying to launch multiple instances of Word, Excel and VFP is ahem... asking for trouble. ;)
>
>>I automate Word to do mail merges for clients, but one client seems to be having some issues I normally don't see. First, they are doing a lot of initial printing and then the amount they do each day will taper off to some relatively small number between (guessing) 50 and 150 documents. This application is run under Terminal Services. There are about 390 documents and they have to be sent out to 3 or 4 thousand times intially. Printing started out fine, but the last couple of days they've run into locking problems (only one person is printing at the moment AFAIK). Each document uses the same Excel file for its data source. The data source is repopulated between each document, the document prints, the data source is repopulated, then the next document prints.
>>
>>So I thought maybe I'd use a different data source for each document. I have a program to attach a data source to a Word doc and it worked great to attach the one single data source to each document, but when attaching a different data source to each document there are problems. I've discovered that if Excel is already open when the program is run, it works much faster (60 seconds per doc when Excel is not already open and just over 5 seconds per doc when Excel is open). The problem is that altough Word did not open Excel, it did open the data source doc (the spreadsheet) and it seems it would close the data source document, too. Yet it does not and I'm left with a bunch of open Excel docs. Not that big of a deal, but I'd be left with 390 spreadsheets open in Excel and I'm not sure how my computer will handle that (can you even have that many open docs in Excel).
>>
>>Why the speed difference mentioned above and why is Word leaving the Excel spreadsheet file open? I'd post a code example, but I'm falling asleep at the keyboard. Please post any suggestions you have and I'll try to get some code out here.
eCost.com continues to rip people off
Check their rating at ResellerRatings.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform