Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automating a mail merge
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Automating a mail merge
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:
01193945
Vues:
73
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform