WordPerfect from Visual Basic .Net
WordPerfect from Visual Basic .Net
(OP)
I have some word perfect files (200K+) that I need to open with a VB program and then make some formatting changes. Is there a control like the RICHTEXTBOX control that allows me to open a .wpd file and then operate on it? Or could there be a WORDPERFECT.Document object like the WORD.Document?
I have searched this site and also google, but have found nothing. I have been using ConvertDoc from SoftInterface, and it works ok for batch conversions, but it fails if there is an image embedded in the document.
Thanks for any help!
David
I have searched this site and also google, but have found nothing. I have been using ConvertDoc from SoftInterface, and it works ok for batch conversions, but it fails if there is an image embedded in the document.
Thanks for any help!
David
RE: WordPerfect from Visual Basic .Net
I do know that in vba I usually use wp's wp.PlayPerfectScript() to play the shipping macro to convert files or to play PerfectScript macros that I create. "wp.MacroFilePlay" means to use wp as the WordPerfect.PerfectScript object and the MacroFilePlay() wp command.
Formatting changes usually require some wp code such as in a search and replace routine. One can easily code vba to make a batch list of files to process and then use wp.PlayPerfectScript(). Or just use one batch PerfectScript macro that allows you to specify another PrefectScript macro to play on the opened files from the batch macro.
http://www.wpuniverse.com is where I usually post my PerfectScript code snippets in that forum.
RE: WordPerfect from Visual Basic .Net
What I need to do is remove an embedded graphic (a certification icon) from the file, and then save it as text or RTF. Is this possible from a macro?
David
RE: WordPerfect from Visual Basic .Net
You may have to get all of the boxes to determine which to delete. Use wp.GetData() to do that. I am not sure that .net will show that command from the wp's type library. Search the advanced google.com for "Hobson GetData" or just GetData and set the site to search as wpuniverse.com for some examples. Translating that to vb shouldn't be that difficult. I believe that I posted some vba examples for GetData there as well.
This won't help much since your code will be customized, but wp allows you to record macros in other languages besides PerfectScript. VBA is one that you can set in the PerfectScript utility program's Tools | Settings | Record.