Home Guides Glossary

Code Signing Microsoft Office Macros and Visual Basic for Applications

A code signing certificate can be used to sign content produced by several Microsoft® Office applications such as Word®, Excel® and PowerPoint®.

  • Before you get started, make sure the code signing certificate and private key are in the Windows certificate store. Refer to Installing Code Signing Certificate in Windows for installation instructions.

  • To Code Sign Documents

    1. Open the file you want to sign.
    2. Click the Tools menu, highlight Macro and click Visual Basic Editor.
    3. In the Project Explorer window, select the VBA macro project that you want to sign.
    4. From the Tools menu, select Digital Signature.
    5. Click Choose and select your Code Signing Certificate.
    6. Click OK to close.

    By default, Windows® XP and Windows 7 do not add a time stamp to the certificate.

    If you would like to allow people to continue using your signed Visual Basic® for Applicaions (VBA) code after the certificate expires, modify the registry on your code-signing computer to add a time stamp at the time of signing using the following keys:

    • Create Key: HKEY_CURRENT_USER\Software\Microsoft\VBA\Security
    • Create String: HKEY_CURRENT_USER\Software\Microsoft\VBA\Security\TimeStampURL
    • Create DWORD: HKEY_CURRENT_USER\Software\Microsoft\VBA\Security\TimeStampRetryCount
    • Create DWORD: HKEY_CURRENT_USER\Software\Microsoft\VBA\Security\TimeStampRetryDelay
    • Set the new fields to these values:
      TimeStampURL = http://tsa.starfieldtech.com
      TimeStampRetryCount = 3
      TimeStampRetryDelay = 2

    Domain Registration

    Pay less for website domain names. Register your own .com, .net or .org for as low as $10.18 per year. We have everything you need to get online with your new domain.

    Website Builder

    Build an amazing website in just under an hour with Website Builder. Take advantage of designs created just for your industry and then customize them to reflect your one-of-a-kind idea.

    Website Security

    Protect your website and keep customers safe. Your comprehensive Website Security solution. Get peace of mind by securing your websites.

    cPanel Hosting

    Everything needed to give your website the high-performance home it deserves.  Protect transactions and secure your customer's data with a SSL Certificate
    Copyright © 2005 - 2024.  All rights reserved.  Privacy Policy