Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hidden wordmerge's dialog behind-the-scenes
Message
De
31/03/2016 04:33:32
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Hidden wordmerge's dialog behind-the-scenes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2003
Database:
MS SQL Server
Divers
Thread ID:
01634058
Message ID:
01634058
Vues:
51
In some cases I do an invisible wordmerge. That is, oWord.visbile=.f. and the settings for that merge may even keep it hidden all the way, just send the merged file to print, save in some folder, close Word and quit it. In other cases, it may ask the user to save only after the merge is complete, again depending on the settings for that case.

Now when there's an error - there's a field in the template which does not exist in the csv file prepared for the merge, the invisible word pops up an invisible modal dialog and my app freezes. Click anywhere and it displays the "process is busy, retry, switch to..." but it doesn't show the busy process (Word) because it's invisible, it just drops down the system menu, which isn't really helpful.

The only way out is to alt-tab, as the alt-tab list does contain the invisible apps, and there to select Word. It then shows the dialog (while still keeping the document windows invisible) and then clicking at those it can finally complete. Since I can't expect the hundreds of users to know this trick (alt-tabbing is for us keyboard dinosaurs, normal people ask where to click)... is there a way out of this, short of making Word visible in advance?

In one scenario, I'd keep Word visible but minimized. In another, I'd be able to suppress that dialog and just have it remove the offending fields from the merge process (i.e. default each missing value to a ""). Also valid would be to have a status or error returned instead of dialog.

Um... versions of Word for which this should work are probably 2007 and later, but I can't know if there are still a few holdouts with 2003 or older.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform