This is the documentation for an older version of Scroll Office. Scroll Office is now Scroll Word Exporter. Here you can view the most up-to-date version of Scroll Word Exporter.

Using Word Macros

It is possible to upload Word templates with Word macros (don't mix them up with Confluence macros). Word macros are little pieces of functionality embedded in Word files which can make handling Word files a lot easier. Word macros are written in Visual Basic and can be used for different purposes such as applying special formattings or calculate values. In the following we describe the necessary steps to create a *.docm template executing your macro code whenever the exported document is opened. For more information, see Microsoft Knowledgebase.

Security Considerations

Word macros have been used for malicious things. Therefore a Confluence Admin or a Space Admin may have disabled Word macros in the export schemes.

To insert a macro:

  1. Open your Word template.
  2. Click the View tab, click Macros and View Macros.
    The screen Macros is displayed.
  3. Enter a name for your macro in the field Macro name.
  4. Select your active document in the Macros in drop-down.
  5. Click Create.
    The screen Microsoft Visual Basic for Applications is displayed.
  6. Insert your macro code.
  7. Click File > Save Document1.
    The Screen Save as is displayed.
  8. Select Word Macro-Enabled Document (.docm) in the Save as type drop-down.
  9. Enter a name for your template in the File name field.
  10. Click Save.
    The template is saved and the screen Microsoft Visual Basic for Applications is displayed.
  11. Click File > Close and Return to Microsoft Word.
    The screen Microsoft Visual Basic for Applications is closed and you return to Word.
  12. Save your Word template.

You have now successfully inserted a macro in your Word template. To use the template for your exports, please enable templates with Word macros in the export scheme.