Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Corel WordPerfect 8
Message
 
À
03/12/1999 00:28:14
Jack Williams
Med-Tech Resource, Inc.
Marietta, Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00297593
Message ID:
00301037
Vues:
45
You can send any WP macro command through DDE commands - so your DDE documentation is essentially your WP macro documentation. Here's part of the WP help file (for version 8, but 6 is the same idea):

Sending Commands to Corel WordPerfect

Other applications can also use DDE Execute to control Corel WordPerfect. The application must first initiate a DDE conversation using the service (application) name of "WPWin8_Macros" and topic name of "Commands". Before terminating the conversation, the application can send DDE Execute strings made up of one or more WordPerfect macro commands. Note that Corel WordPerfect accepts only product commands, not programming commands. These product commands cannot contain variables or expressions. See the Corel WordPerfect Macros Help file for a list of product commands and descriptions.

Copyright © Corel Corporation Limited. 1996, 1997. %date. All Rights Reserved.


HTH

>It took me a while because I was digging to find where to find more information than I have in me noggin'. I've always wondered where these guys found the DDE commands relevant to WordPerfect and you know - I still can't find it. Heck - not even our resident veterans remember how they put it all together (once valiant foxpro loyalists, now forsworn traitors! much too caught up in perl and visual basic lately to descend from the ivory...) Ah yes - VFP5, WPWin8, and the price of corned beef hash in Mexico. Where were we...
>
>The following is the sum and total of my knowledge about the subject. It's one of those snippets of code I've only been bold enough to cut-and-paste (you know the ones.) Know that (wpfile) is a string containing the name of the file we want to print.
>
>! /n7 c:\corel\suite8\programs\wpwin8.exe && <---- Fires up WPWin8.
>
>wpchan = DDEInitiate("WPWin8_Macros", "Commands") && <---- begins DDE Dialogue.
> && DDEInitiate returns an n value reflecting the # of the "DDE Channel"
> && the DDE Help files in VFP5 are much more eloquent on this than I.
>
>if file(wpfile)
>
> rvalue = DDEExecute(wpchan, 'FileOpen(Filename:"'+ wpfile+ '"; Format:WordPerfect_CompoundFile!)')
> rvalue = DDEExecute(wpchan, 'PrintSettings (Action: Update!; SettingName: Default!)')
> rvalue = DDEExecute(wpchan, 'PrintCopies (NumberOfCopies: 2)')
> rvalue = DDEExecute(wpchan, 'Print()')
> rvalue = DDEExecute(wpchan, 'CloseNoSave(Verify:No!)')
>endif
>
>rvalue = DDEExecute(wpchan, 'ExitWordPerfect()')
>= DDEterminate(wpchan)
>wait window 'Printing complete.' timeout 2
>
>
>There. Not too tough to parse for yourself there. I leave the two "&&'s" out of self-mockery. The stinger, though - where does that FileOpen and PrintSettings and Print() business come from? Those are commands understandable to WordPerfect, not vfp, so look for them all through the WPWin documentation (the help files are where they are rumoured to be found -- I was unable to confirm this.) My hunch: they're in Macro-ese. Notice the mention of macros in the DDEInitiate line. (Yes, more profundities -- geesh.)
>
>DDEExecute can, of course, do more than print. It can do all sorts of evil mean and nasty things, including reformatting, converting between versions of WP, walking the dog...
>
>You guessed it - I'm gleefully clueless about this other than "it works." I've a couple more brains to pick about this, but if the well's dry just know that DDE works -- even in Georgia. Good luck finding those commands. Let me know if you do. It'd be quite a find.
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform