Digitally Signing Your Macros
You can digitally sign your macros after obtaining an authenticated digital certificate. You must import the certificate for use in VBA, then choose it in the Digital Signature dialog box.
- Obtain your certificate from a third party provider (for example, Verisign or Thawte).
- To import the certificate into your certificate store (for eventual use in VBA), go to Microsoft's download site, and enter as the keyword, "PVK Digital Certificate Files Importer."
- Click the link to download the PVK Import utility to your computer.
- Run the utility on your computer to allow your certificate to be used in your Sage 300 macros.
- Open Sage 300.
- Open a macro in the macro editor.
- In the Visual Basic for Applications Editor, select Tools from the menu bar, then select the Digital Signature command.
- Select the certificate required for this macro.
- After signing your macro, save it, exit and then re-edit to verify that the signature is still there.
You can set security levels for your macros. To run only those that have been digitally signed, set the level to High.
Note that if a macro is edited on a machine which does not have the certificate stored, the macro will become unsigned.
If your macro contains an embedded Sage 300 UI, see the Sage 300 Development Partners wiki for instructions on digitally signing your Sage 300 UI control.
- The embedded UI has to be downloaded on the Sage 300 Web desktop before you run the macro. For example, if you have a macro that is designed to import customers, you must first open the Customers UI and only then run the macro. Each UI you open on the Web desktop must be downloaded from the server before you can use it. If it has not been downloaded, the macro cannot run.
- If a macro has an embedded UI, and that UI changes (via a Service Pack release, or a new version installation), then in addition to updating the macro to replace the UI control with the new version, if you tried to run the old macro, you may notice that it will no longer run. In order to run the macro (with the new embedded UI), you will have to delete the VBA-created <UI control name>.exd file from your machine. (You can simply search for all *.exd files and delete them, as the files are created again the next time a macro is run.)