Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

WordPerfect from Visual Basic .Net

WordPerfect from Visual Basic .Net

WordPerfect from Visual Basic .Net

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!


RE: WordPerfect from Visual Basic .Net

Not that I know of but then I don't do much .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

Thank you.  That information is great.  

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?


RE: WordPerfect from Visual Basic .Net

It is easy for me to do that in PerfectScript.  Doing it in vba or even vb.net should easy too.  Use wp.FileOpen() first.  Then use wp.BoxDelete() if you know the box number will be the same.  You may want to set up a transaction data file to remove files as you process them just in case something goes wrong.  I recommend backing up your first first.

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close