lalive.blogg.se

Wordperfect x6
Wordperfect x6








The problem with this route is that you would need to create a model of the specification in order to create a binary file that WordPerfect can correctly open. You also have the option of creating a WP document, without opening WordPerfect, by programmatically creating a file in the proper WP format, using what Corel calls the "WordPerfect File Specification". Marshal.ReleaseComObject(wp) //need to release PerfectScript in order to re-gain Somebody forgot to provide enums for this command, Wp.AttributeAppearanceOn(14) // Underline. usually a string or integer, VS provides enums. Wp.Justification(_Justification_Justification_enum.Ĭenter_Justification_Justification) // Instead of using the PS argument, which is

wordperfect x6

in C#, so Visual Studio modified the name to "KeyType"

wordperfect x6

Wp.KeyType("Hello World!") // note that the PS macro command is "Type", but that is a reserved keyword Here is a very simple example of what you can do. Add a reference to your project to the tlb.Ģ) Add a "using WordPerfect " and "using " reference to any file that will use the PerfectScript commands.ģ) Fire up PerfectScript and create your document! Using the tlb is easier, if it's there, but if not, you can always create a tlb using the command-line program regasm.exe. This should be in the Corel/./programs folder where WP is installed. The steps you will need to take to create a WP document are:ġ) find the wpwin17.tlb or the wpwin17.dll-assuming you are using WP x7. This is the same language that macro writers use to automate WordPerfect from within WordPerfect, except that slightly different syntax is used when using the language from.

wordperfect x6

You will also need to become familiar with the PerfectScript command set (there are hundreds of possible commands). Most of the examples on that site use Visual Basic, which is a bit like riding your horse to the office, but it is pretty simple to translate the ideas to C# (or IronPython). I would first spend a few hours looking at this site, especially the section of using VB.NET to control WordPerfect.

wordperfect x6

NET and the PerfectScript API that comes with WP. It is fairly simple, however, to create a WP document using. I may be wrong, but when I looked through that SDK, it was more about modifying how the WordPerfect program functions. I don't think you want to go the route of using the SDK to create a WordPerfect document.










Wordperfect x6