Signed Macros in Microsoft Word

Infineon Security Platform

Infineon Security Platform Solution

Digitally Sign a Macro Project  in Microsoft Word

Security Levels

  1. Click on Tools > Macro > Security ... to open the Security dialog.
  2. Choose the Security Level you need: High / Medium / Low.

Recording a new Macro

  1. Open a new document with click on New Blank Document.
  2. Click on Tools > Macro > Record New Macro.... (Note in Microsoft Word 2007: Click on View > Macros > Record New Macro...).
  3. The Record Macro dialog comes up.
  4. Insert Macro name and click on the OK button to close the dialog
  5. Write Macro text
  6. Click on Stop Recording.

Signing a (new) Macro in Microsoft Word 2007

  1. Open the document or template that contains the macro project you want to sign, if the file is not open.
  2. Click on View > Macros > View Macros, the Macros dialog appears.
  3. Select a Macro name from the list. You can either run, edit, create or delete a macro.
  4. Click on the Edit button to open a Visual Basic window. Now edit your selected macro.
  5. Go to the Project Explorer to select the project you want to sign.
  6. Click on Tools > Digital Signature... in the Visual Basic window to open the Digital Signature dialog.
  7. Click on Choose... to open the Select Certificate dialog.
  8. Select a suitable certificate from the list.
  9. Click on View Certificate to view the certificate information in the Certificate dialog.
    Note:
    Click on Details tab to view the certificate information in the Certificate dialog. Click on the OK button to close this dialog.
  10. Click on the OK button to close the Select Certificate dialog.
  11. Close the Digital Signature dialog by clicking on the OK button.
  12. To save your macro click on Save and save the document or template as Word Macro-Enabled Document.
    Note:
    Because Microsoft Word uses your private key to sign your macro, you have to insert your private key secret.
  13. Click on File > Close to return to Microsoft Word.

Signing a (new) Macro

  1. Open the document or template that contains the macro project you want to sign, if the file is not open.
  2. Click on Tools > Macro > Macros, the Macros dialog appears.
  3. Select a Macro name from the list. You can either run, edit, create or delete a macro.
  4. Click on the Edit button to open a Visual Basic window. Now edit your selected macro.

    Note:
    You can also open the Visual Basic window with click on Tools > Macro > Visual Basic Editor.
  5. Go to  the Project Explorer to select the project you want to sign.
  6. Click on Tools > Digital Signature ... in the Visual Basic window to open the Digital Signature dialog.
  7. Click on Choose to open the Select Certificate dialog.
  8. Select a suitable certificate from the list.
  9. Click on View Certificate to view the certificate information in the Certificate dialog.

    Note:
    Click on Detail ... to view the certificate information in the Certificate dialog. Click on the OK button to close this dialog.
  10. Click on the OK button to close this dialog.
  11. Close the Select Certificate dialog by clicking on the OK button.
  12. Close the Digital Signature dialog by clicking on the OK button.
  13. To save your macro click on Save Normal.

    Note:
    The macro can be saved in the Normal (All Documents (Normal.dot)) project folder or in the Document project folder.

    Because Microsoft Word uses your private key to sign your macro, you have to insert your private key secret.
  14. Click on File > Close to return to Microsoft Word.


©Infineon Technologies AG