|
If you've created a macro that
doesn't seem to work right or it just freezes up when you play
it, here's a simple trick to help you figure out what's wrong:
Back up your macro first.
Edit the macro, and on the line
under the "Application( ... )" command -- generally
this is the first line in your macro, so start on line 2 -- add
these two commands:
Display (On!) Speed
(1)
On the Macro Toolbar, click Save
& Compile.
Turn WordPerfect's Reveal Codes
window ON, then play the macro. Watch what happens in the Reveal
Codes window. You may be able to tell where the macro is going
wrong as it executes its commands.
When you are done fixing things
(also see the TIP below), delete the Speed() command and restore
the Display command from Display(On!) to Display(Off!).
The first command, Display(On!),
will display all events during the macro's playback (if you get
any dialog box error messages such as "... not found,"
just click OK and the macro should continue). Be sure there
isn't a Display(Off!) under these commands; if there is,
delete it or comment it out with double forward slash marks.
The Speed() command slows down
the macro's execution. You can set this to a higher number than
"1" to really slow it down. As the macro plays, watch
the screen and the Reveal Codes window. [More recent versions
of WordPerfect support the Step() command, but new users
may find the Speed() command easier to use and understand.]
=TIP= You
can also edit the macro and add the command QUIT near the top
after the first commands that perform some action, then Save
& Compile. QUIT causes the macro to stop immediately at that
point. Play the macro: If things worked OK to that point, delete
the QUIT command and enter another QUIT command further down
in the macro code. Repaeat the process until you find the segment
of code that is causing the problem.
|