Aims

You may have a need to place your own macros into templates so that when the end user generates a document your macro will fire – such as automatically running a spellcheck or other process.

This guide assumes you already have knowledge of creating macros within Word Documents

1    Process

  1. Create your macro as you would normally, and place the macro into a relevant point within the VBA back-end of your document. If the macro is to fire as the document is opened by the end user, place the macro command(s) into the Document.Open procedure.
  2. Save your document as a .DOCM (Macro-Enabled Document), rather than a DOCX file. See Fig. 1.
  3. Upload your document as normal.

Now, when your end users generate a document the macros will be contained within the document, and if they have been included within the Document.Open procedure will fire as the document is opened by the user.

Macro Screenshot 2 (Fig. 1)

image_pdfimage_print