Creating and Modifying Styles
If a style format does not suit you, instead of applying another style you should modify the style provided. This way you will not have to open all the descriptors to change the style name.
Modifying a style
To modify a style:
1. Open the style sheet ("xx.dot", the default being "Megastyl620.dot").
2. Save it in the “Mega_Std” folder of the custom module tree-structure.
3. Modify the style.
Remarks on modification of styles
The default style sheet “Megastyl620.dot” is write-protected in the Mega_Std folder. You can create a new one in the “Mega_Std” folder of the custom module.
Styles are defined hierarchically.
For example, “M-Sublevel 2” is based on “M-Sublevel 1”.
This is why modifications made to one style may impact other styles.
You can modify a style without having to modify the object descriptors; all descriptors whose text uses this style will include the modification. To ensure that modifications to a style are taken into account, they have to be included in the style sheet defined in the user options. All reports (MS Word) defined using report templates (MS Word) or descriptors based on the style sheet will then be modified accordingly.
To modify the orientation (portrait/landscape) or the margins of generated reports (MS Word):
*Modify the document template directly.
Parameterizing the report templates (MS Word) allows you to define which style sheet should be used when creating a report (MS Word) based on this report template (MS Word). The user can modify the template using standard MS-Word template and style manipulation functions.
*Use of frames is not recommended in definition of styles. It is also not recommended to use images in the style sheet (for example in the footer).
Creating a new style
You can create a new style that can be used in the texts of object descriptors.
When you create a new style, you have to add it to the “Megastyl620.dot” style sheet. It then becomes available to the object descriptors.
*Never insert the style directly into the descriptor. To ensure that the style is properly defined in generated reports (MS Word), it must be included in the style sheet specified in the user options. Avoid using the same style in the body of the text and in a table. If you later reduce the size of this style, cells using this style could become so small they are illegible.
*Styles provided in the default style sheet are prefixed with "M-". However the new styles you create do not have to be prefixed with "M-".
Attaching a style sheet
You can attach a style sheet to an environment or to a user:
The style sheet attached to the environment will be the default for each user you create.
The style sheet attached to a user will be the default when the user creates a new report template (MS Word) or descriptor.
*After creation, the report (MS Word) is independent and modifications made to the style sheet are not automatically reflected in the report (MS Word).
*Styles taken into account in a report (MS Word) created from a report template (MS Word) are those contained in this report template (MS Word). Only the names of styles defined in a descriptor are included in the report (MS Word). The details for the styles defined in the descriptor are replaced by those inherited from the report template (MS Word).
When a style used in a descriptor does not exist in the report template (MS Word) being used, it is replaced by the “Normal” style. For this reason, it is recommended that you create style sheets using “Megastyl620.dot” as the template.
You can define or modify a style by testing it in a descriptor. However, to make this new style or modification available to new report templates (MS Word), you should also define or modify the style in the style sheet attached.
Customizing the default style sheet
It is advised to use the Megastyl620.dot syle sheet provided.
To customize this style sheet:
1. Copy the reference style sheet (“Megastyl620.dot”) to the “Mega_Std” folder of the custom module tree-structure.
2. Open the style sheet with MS Word, without running HOPEX.
3. Make the style modifications or create a new style.
4. Using HOPEX, attach the style sheet to the user, so that it becomes the default style sheet for descriptors.
*Attach the style sheet by indicating this style sheet in the Documentation > Reports (MS Word) options.
Applying styles in a descriptor
It is recommended to attach a style sheet to a descriptor.
To apply or make sure modified styles are available in a descriptor:
1. Edit or update styles as described in Customizing the default style sheet.
2. Open the descriptor and select MEGA > Properties.
3. In the descriptor properties, select the desired RTF stylesheet.
When the descriptor is edited, it is loaded with the appropriate stylesheet.
Synchronizing styles in a report template (MS Word)
It is sometimes necessary to synchronize styles between a report template (MS Word) and the stylesheet.
*The prerequisite for the following procedure is to customize the MS Word ribbon and to add a button to call MS Word options.
To synchronize styles:
1. Open the report template (MS Word).
2. Click the MS Word options button you have added to the ribbon.
3. Select Add-Ins on the left in the MS Word options dialog box.
4. Select Manage "Word Add-ins" and click Go.
5. Click the Organizer button.
The Windows Organizer is loaded.
Note that:
The styles displayed on the left (document Unnamed) are the styles of the report template (MS Word) saved in the system repository
The styles displayed on the right will be used to access the RTF stylesheet.
6. Below the right list click Close File then browse to get the .dot file of the RTF stylesheet.
7. Add styles from the right list (RTF stylesheet) to the left (Report template (MS Word)).
*Note that some styles of the left list cannot be deleted (Normal, Heading 1 for instance).