Security Policy Errors

Where to Store a Certificate for Office Macro Signing

Algirdas JasaitisAlgirdas Jasaitis Nov 3, 2026 868 views

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.

Where to Store a Certificate for Office Macro Signing
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.
Before you start

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.

Solution 1Recommended

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.

1
Locate the Certificate File

Find your original code signing certificate file, which should be exported with its private key (commonly a .pfx file).

2
Import to the Personal Store

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.

3
Verify in the Office Trust Center

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.

Install the Signing Certificate with the Private Key
Private Key Requirement: If you do not possess the private key, any changes made to the VBA code will automatically strip the existing digital signature to protect the document's integrity.
Free Microsoft Office alternative

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. 1. Download the Installer: Visit the official WPS Office website and click the free download button to get the latest version.
  2. 2. Install WPS Office: Run the downloaded installer file and follow the simple on-screen instructions to set up the software.
  3. 3. Open Your Macro Files: Launch WPS Office and open your existing .xlsm or .docm files directly to continue your work seamlessly.
Highly compatible with Microsoft Excel formats (.xlsx, .xlsm, .xls)Built-in support for VBA macros and advanced formulasLightweight application with lower system resource requirementsFree to download and use with an intuitive, tabbed interface
microsoft office alternative - wps office

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.