|
|
|
January 2000: Creating a VB Macro
All VBA macros are created in the Visual Basic Editor. You can record some of the VBA code, but you must paste it into the editor to make the code work. (See PSJournal for August 1999)
To start a VBA macro,
Click Tools > Visual Basic > Visual Basic Editor.
Note: If the Visual Basic Editor option is greyed out on the menu, you probably didn't install VBA with WordPerfect. It is not installed by default. Start the WordPerfect installation again, select Custom Install, adn select VBA.
You’ll also see an option for each document that is currently open. You can create a macro that is specific only to one document by selecting one of these items when you create your macro.
To create a global macro in VBA,
The routine will be saved to the GlobalMacros file.
Copyright Notice: The information included in the PerfectScript Journal is protected by US Copyright. The author grants you the right to use the routines in your own macros as needed. You may not sell, distribute, or publish them in any form.If you choose to use the information here, you do so entirely at your own risk. No representations are made regarding the fitness of this information for your particular purpose, or for your ability or inability to use the information. You are advised to make backups of all relevant files before implementing any suggestion or technique.© Copyright 2000 by J. Jeppson. |