Where to Store a Certificate for Office Macro Signing
Question details
The user needs to know the correct certificate store location for an Office macro signing certificate so that the digital signature is not removed when modifying code on different development computers.

- Product
- Microsoft Office
- Device & OS
- not provided
- Scenario
- Editing and deploying digitally signed Office macro projects across multiple computers.
- Observed behavior
- The digital signature of the Office macro project is removed after code changes are made on another computer, despite the certificate being trusted as a publisher.
Ensure you have the original digital certificate file (usually in .pfx or .p12 format) that includes the private key, as well as administrative privileges on the development computers.
Install the Signing Certificate with the Private Key
To sign macros or retain signatures when editing, the private key of the certificate must be installed in the Personal certificate store of every development computer.
A common mistake is adding the certificate to the Trusted Publishers list without installing the private key. While Trusted Publishers allows a computer to run the signed macro, the private key is strictly required to apply or maintain the signature during code edits.
Find your original code signing certificate file, which should be exported with its private key (commonly a .pfx file).
Double-click the certificate file to open the Certificate Import Wizard. Select 'Current User' as the store location, enter the password for the private key, and choose to place all certificates in the 'Personal' certificate store.
Open your Microsoft Office application (e.g., Excel or Word). Navigate to File > Options > Trust Center > Trust Center Settings > Trusted Publishers to ensure the certificate deployment is recognized.

Verify Group Policy Certificate Deployment
If you are deploying certificates across an organization, ensure your Group Policy Object (GPO) correctly publishes the certificate to the intended systems.
Try WPS Office for Seamless Macro and Spreadsheet Management
If you frequently encounter complex certificate management and Trust Center issues in Microsoft Office, consider switching to WPS Office. It provides robust spreadsheet capabilities, highly compatible macro support, and a user-friendly environment without a steep learning curve.
- 1. Download the Installer: Visit the official WPS Office website and click the free download button to get the latest version.
- 2. Install WPS Office: Run the downloaded installer file and follow the simple on-screen instructions to set up the software.
- 3. Open Your Macro Files: Launch WPS Office and open your existing .xlsm or .docm files directly to continue your work seamlessly.

Frequently Asked Questions
Why does my macro signature disappear when edited on another computer?
When you modify a macro on a computer that does not have the private key of the original signing certificate installed, the Office application automatically removes the digital signature to protect the document's integrity and indicate that the code has been altered.
What is the difference between a Trusted Publisher and a private key?
A Trusted Publisher entry uses the public key to tell Office that you trust the code signed by that specific entity, allowing it to run. However, to actively sign or modify code, you must possess the private key, which must be securely stored in your Personal certificate store.
How do I view my installed certificates in Windows?
Press the Windows key, type 'certmgr.msc', and press Enter. This opens the Certificate Manager, where you can view certificates stored under the 'Personal' folder to confirm if your code signing certificate and its private key are installed.




