In order to sign your Visual Basic for Applications (VBA) code in Microsoft Office 2007, you will need to follow the following steps. To work with macros in Office Word 2007, you need to show the Developer tab.
From your document, right click the ribbon bar and select “Customize Quick Access Toolbar”
In Word Options, select Popular and check the “Show Developer tab in the Ribbon” option
From your document select the Developer tab, then click the Visual Basic button:
At this point the Visual Basic editor will open with the project name of the file you are working on. By right clicking on "Microsoft Word Objects" in the left hand pane, you should select "Insert" and then "Module".
You may now enter your visual basic code in the main panel.
From here you can sign your code with your ObjectSign digital certificate by choosing "Tools" and then "Digital Signature" from the top menu.
At this point another window will open and you will see the current signature associated with this Module, Office will also allow you to choose a certificate to either sign the module or change the certificate which has currently signed the module.
-------------------------------------------------------------------
If you chose to select a different certificate you will be presented with the following screen, from here select the certificate you wish to sign your code with and click "OK"
-------------------------------------------------------------------
You will now see that the Module is signed with the chosen certificate.
-------------------------------------------------------------------
You should now save your file from inside the visual basic editor.
-------------------------------------------------------------------
In order to test that the VBA in the document has been properly signed, completely close the document from your office application and then reopen it. If Macros are disabled you will receive the Security Warning bar, click Options to continue.
To always trust Macros from this publisher select “Trust documents from this publisher”
Once accepted, the Macros will run transparently. |