"Ads by Google" links provided by Google.com, which has sole control over all advertising content it displays on this site.

Home | Tips | Library | Other Authors | Other WP Sites | Writer's Links | Contact | Site Map

Barry MacDonnell's
Toolbox for WordPerfect

Macros, tips, and templates for Corel® WordPerfect® for Windows®
© Copyright 1996-2008 by Barry MacDonnell. All Rights Reserved.

Page updated July 28, 2007
WordPerfect Tips
Main tips page | Browse tips

Copying macro code from the Internet (i.e., web page, newsgroup post, or e-mail) into WordPerfect

(1) Select all text from beginning to end, and copy it to the Windows clipboard with Ctrl+C (or Edit, Copy).

(2) Open a new, blank document in WordPerfect and click on Tools, Macro, Macro Toolbar to display the Macro Toolbar.

(3) Position your cursor immediately after any codes in the new document (look in Reveal Codes to see where the cursor is located), and click on Edit, Paste Special, Unformatted Text to paste the macro code into the WP document without any extraneous formatting or other unwanted codes.

Important: Some macros use Search and Replace commands. After you paste the macro into WordPerfect, be sure to replace any indicated "text placeholders" in the SearchString() and ReplaceString() commands (or where otherwise indicated by the author) with the actual WordPerfect binary codes from the Codes button on the Macro Toolbar. These text substitutes or placeholders may have been typed into certain locations by the author because simply copying macro code from the author's WP screen to a newsgroup post usually strips out any special WP format codes.

For example, if you see a command like this - SearchString("[HRt]") - just delete the text string, [HRt], inside the parentheses (but keep the double quote marks) and, in its place, insert the actual binary code with the Codes button on the Macro Toolbar.

(The Codes button brings up a long list of codes. In this example, you would place your cursor between the two quote marks and click the Codes button on the Toolbar to bring up the Macro Codes dialog. Under the Search tab, choose HRt from the Macro Codes list, then click the Insert button, then click Close. In Reveal Codes you should now see a code [Macro Func], instead of the text placeholder characters.)

(4) Save the pasted material with the Save & Compile button on the Macro Toolbar. This will save the macro to your default macros folder as shown in Tools, Settings, Files, Merge/Macro. (Advanced users may wish to save to a different folder, and will therefore need to include the path to that folder.)

Messages: If you get an error message when you press Save & Compile, check the pasted text for long lines that may have wrapped into two or more lines with a hard return [HRt] or line break [Ln Brk] between them; remove the hard return(s) or line break(s) to "glue" the lines back together.

(5) Play the macro with Tools, Macro, Play (or Alt+F10).

TIPS

  • You may need to edit the Application() command at the top of the code (if one exists) to change the language code from "EN" (or "US" or other language) to the language version you are using. Or, if you are using just one language version of WP, just delete the last semicolon along with the "EN," to get something like this: Application (WordPerfect; "WordPerfect"; Default)
  • You can delete any annotations or comments in the copied material (i.e., all text following "//" marks up to the end of the line), though usually there is no need to do so (and you may want to keep them for future reference, anyway).
  • For easy access, you can assign the macro to a keystroke combination, a toolbar button, or a menu. See EasyPlay.