Modifying Document Behavior
You can customize opening and closing behavior of files containing business document data.
Business document customization is carried out by attaching a Regeneration Macro.

Use of
MEGA macros is proposed with a license
HOPEX Power Studio.
To use the VB macro creation wizard on an object of Business Document type:
1. Select the Business Document from the explorer.

For more information on using the explorer, see "Exploring the Repository" in the
HOPEX Common Features guide.
2. Display "Empty Collections".
3. Right-click the "Regeneration Macros" folder and select New.
The macro creation wizard opens.
4. Select the check box corresponding to the type of macro you want to use, for example:
• "(VB) Script macro"
• "Existing macro": to use an existing macro, of which field Reusable is selected.
5. Click Next.
6. Enter the Name of the macro.
7. If the macro you have created can be reused, for another Business Document, select the Reusable box.
8. Click Finish.

You can create a macro from the Script editor. It is created in folder "Macro VBS > Unclassified Macros" with its VB Script code empty.
When you define behavior in the macro code, note that:
• The input document should be stored in a location different from the output document.
• If several macros are created, they are sequenced.