{"id":167,"date":"2021-11-13T00:00:00","date_gmt":"2021-11-13T00:00:00","guid":{"rendered":"https:\/\/codesigncert.com\/resourcesnew\/how-do-i-sign-a-vba-macro-in-ms-office-with-a-timestamp\/"},"modified":"2026-08-10T14:37:43","modified_gmt":"2026-08-10T14:37:43","slug":"how-do-i-sign-a-vba-macro-in-ms-office-with-a-timestamp","status":"publish","type":"resources","link":"https:\/\/codesigncert.com\/resources\/how-do-i-sign-a-vba-macro-in-ms-office-with-a-timestamp\/","title":{"rendered":"How do I sign a VBA Macro in MS Office with a timestamp?"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 ez-toc-wrap-right counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"#\" data-href=\"https:\/\/codesigncert.com\/resources\/how-do-i-sign-a-vba-macro-in-ms-office-with-a-timestamp\/#A_step-by-step_instructions_to_sign_a_VBA_Macro_in_MS_Office_with_a_timestamp\" >A step-by-step instructions to sign a VBA Macro in MS Office with a timestamp<\/a><\/li><\/ul><\/nav><\/div>\n<div class=\"col-lg-12 mb-3 p-2\">\n<h2><span class=\"ez-toc-section\" id=\"A_step-by-step_instructions_to_sign_a_VBA_Macro_in_MS_Office_with_a_timestamp\"><\/span>A step-by-step instructions to sign a VBA Macro in MS Office with a timestamp<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Prior to executing any further commands and tasks, you need to verify that your certificate is installed in the Windows CSP. For that, right-click on your PFX file and select Install or import through Internet Explorer by clicking on:<\/p>\n<h3>Follow these steps on how to sign VBA Macro with Timestamp:<\/h3>\n<ul>\n<li>Internet Options<strong> menu -&gt; Content -&gt; Certificates -&gt; Import<\/strong>.<\/li>\n<li>Now, <strong>open the VBA project<\/strong> that you want to sign. Go to the <strong>Tools<\/strong> menu and select <strong>Digital Signature<\/strong>.<\/li>\n<li>From that Digital Signature window, click <strong>&ldquo;Choose&rdquo;<\/strong> and select your <strong>PFX file<\/strong>.<\/li>\n<li>Click <strong>OK<\/strong> and <strong>Save<\/strong>.<\/li>\n<li>By now, your MS Office document is digitally signed.<\/li>\n<li>By default, the certificate is not time stamped in some of the platforms like Windows Vista and Windows 7. If you&rsquo;re signing through those platforms below are the steps to timestamp:<\/li>\n<li>For timestamping your VBA macros by default, you must create a file named timestamp.bat and copy\/paste these lines:<\/li>\n<\/ul>\n<p>reg add &#8220;HKCUSoftwareMicrosoftVBASecurity&#8221; \/v &#8220;TimeStampURL&#8221; \/f \/d<\/p>\n<p>&#8220;http:\/\/timestamp.comodoca.com\/authenticode&#8221;<\/p>\n<p>reg add &#8220;HKCUSoftwareMicrosoftVBASecurity&#8221; \/v &#8220;TimeStampRetryCount&#8221; \/f \/t REG_DWORD \/d 2<\/p>\n<p>reg add &#8220;HKCUSoftwareMicrosoftVBASecurity&#8221; \/v &#8220;TimeStampRetryDelay&#8221; \/f \/t REG_DWORD \/d 1<\/p>\n<ul>\n<li><strong>Save<\/strong> the file and<strong> double-click to run<\/strong> it, then <strong>confirm Yes<\/strong> when prompted.<\/li>\n<\/ul>\n<p><strong>Note:<\/strong><\/p>\n<ul>\n<li>A timestamp is an extra step, however a very critical and important one. It keeps your signature valid, even after the expiration of the certificate.<\/li>\n<li>To verify a timestamp on a signed macro, run the macro after setting the computer&rsquo;s clock past the expiration date of the certificate. If it&rsquo;s signed correctly, it will still run as signed.<\/li>\n<\/ul>\n<div style=\"width: 100%; float: left; margin: 30px 0; border: 5px solid #d6d6d6; border-radius: 5px;\">\n<div style=\"width: 100%; float: left; background-color: #108ab3;\">\n<div class=\"container\" style=\"text-align: center;\">\n<div style=\"padding-left: 20px;\">\n<h3 style=\"font-size: 24px; text-decoration: underline; line-height: 30px; color: #ffffff; font-weight: bold; padding: 15px 0;\">Buy Sectigo EV Code Signing Certificate at Only $219 Per Year<\/h3>\n<\/div>\n<\/div>\n<\/div>\n<\/div><\/div>\n<div class=\"col-lg-12 mt-5 mb-4\">\n<h4 class=\"text-primary mb-4 pb-2 border-bottom\">Related Articles<\/h4>\n<div class=\"row g-4\">\n","protected":false},"excerpt":{"rendered":"<p>Our code signing experts at CodeSignCert.com has built quick guide on signing a VBA Macro in MS Office with a timestamp. If you want to use timestamp for your VBA Macro, then read it now!<\/p>\n","protected":false},"featured_media":0,"template":"","meta":[],"resources_category":[52],"class_list":["post-167","resources","type-resources","status-publish","hentry","resources_category-code-signing-resources"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How do I sign a VBA Macro in MS Office with a timestamp?<\/title>\n<meta name=\"description\" content=\"Our code signing experts at CodeSignCert.com has built quick guide on signing a VBA Macro in MS Office with a timestamp. If you want to use timestamp for your VBA Macro, then read it now!\" \/>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How do I sign a VBA Macro in MS Office with a timestamp?\" \/>\n<meta property=\"og:description\" content=\"Our code signing experts at CodeSignCert.com has built quick guide on signing a VBA Macro in MS Office with a timestamp. If you want to use timestamp for your VBA Macro, then read it now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codesigncert.com\/resources\/how-do-i-sign-a-vba-macro-in-ms-office-with-a-timestamp\/\" \/>\n<meta property=\"og:site_name\" content=\"CodeSignCert\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codesigncert\" \/>\n<meta property=\"article:modified_time\" content=\"2026-08-10T14:37:43+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@codesigncert\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/codesigncert.com\\\/resources\\\/how-do-i-sign-a-vba-macro-in-ms-office-with-a-timestamp\\\/\",\"url\":\"https:\\\/\\\/codesigncert.com\\\/resources\\\/how-do-i-sign-a-vba-macro-in-ms-office-with-a-timestamp\\\/\",\"name\":\"How do I sign a VBA Macro in MS Office with a timestamp?\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codesigncert.com\\\/blog\\\/#website\"},\"datePublished\":\"2021-11-13T00:00:00+00:00\",\"dateModified\":\"2026-08-10T14:37:43+00:00\",\"description\":\"Our code signing experts at CodeSignCert.com has built quick guide on signing a VBA Macro in MS Office with a timestamp. If you want to use timestamp for your VBA Macro, then read it now!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/codesigncert.com\\\/resources\\\/how-do-i-sign-a-vba-macro-in-ms-office-with-a-timestamp\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/codesigncert.com\\\/resources\\\/how-do-i-sign-a-vba-macro-in-ms-office-with-a-timestamp\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/codesigncert.com\\\/resources\\\/how-do-i-sign-a-vba-macro-in-ms-office-with-a-timestamp\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/codesigncert.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Resources\",\"item\":\"https:\\\/\\\/codesigncert.com\\\/?post_type=resources\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How do I sign a VBA Macro in MS Office with a timestamp?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/codesigncert.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/codesigncert.com\\\/blog\\\/\",\"name\":\"CodeSignCert\",\"description\":\"All in One Code Signing Certificate Store\",\"alternateName\":\"Code Sign Cert\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/codesigncert.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How do I sign a VBA Macro in MS Office with a timestamp?","description":"Our code signing experts at CodeSignCert.com has built quick guide on signing a VBA Macro in MS Office with a timestamp. If you want to use timestamp for your VBA Macro, then read it now!","robots":{"index":"noindex","follow":"follow"},"og_locale":"en_US","og_type":"article","og_title":"How do I sign a VBA Macro in MS Office with a timestamp?","og_description":"Our code signing experts at CodeSignCert.com has built quick guide on signing a VBA Macro in MS Office with a timestamp. If you want to use timestamp for your VBA Macro, then read it now!","og_url":"https:\/\/codesigncert.com\/resources\/how-do-i-sign-a-vba-macro-in-ms-office-with-a-timestamp\/","og_site_name":"CodeSignCert","article_publisher":"https:\/\/www.facebook.com\/codesigncert","article_modified_time":"2026-08-10T14:37:43+00:00","twitter_card":"summary_large_image","twitter_site":"@codesigncert","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/codesigncert.com\/resources\/how-do-i-sign-a-vba-macro-in-ms-office-with-a-timestamp\/","url":"https:\/\/codesigncert.com\/resources\/how-do-i-sign-a-vba-macro-in-ms-office-with-a-timestamp\/","name":"How do I sign a VBA Macro in MS Office with a timestamp?","isPartOf":{"@id":"https:\/\/codesigncert.com\/blog\/#website"},"datePublished":"2021-11-13T00:00:00+00:00","dateModified":"2026-08-10T14:37:43+00:00","description":"Our code signing experts at CodeSignCert.com has built quick guide on signing a VBA Macro in MS Office with a timestamp. If you want to use timestamp for your VBA Macro, then read it now!","breadcrumb":{"@id":"https:\/\/codesigncert.com\/resources\/how-do-i-sign-a-vba-macro-in-ms-office-with-a-timestamp\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codesigncert.com\/resources\/how-do-i-sign-a-vba-macro-in-ms-office-with-a-timestamp\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/codesigncert.com\/resources\/how-do-i-sign-a-vba-macro-in-ms-office-with-a-timestamp\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codesigncert.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Resources","item":"https:\/\/codesigncert.com\/?post_type=resources"},{"@type":"ListItem","position":3,"name":"How do I sign a VBA Macro in MS Office with a timestamp?"}]},{"@type":"WebSite","@id":"https:\/\/codesigncert.com\/blog\/#website","url":"https:\/\/codesigncert.com\/blog\/","name":"CodeSignCert","description":"All in One Code Signing Certificate Store","alternateName":"Code Sign Cert","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codesigncert.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/codesigncert.com\/blog\/wp-json\/wp\/v2\/resources\/167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codesigncert.com\/blog\/wp-json\/wp\/v2\/resources"}],"about":[{"href":"https:\/\/codesigncert.com\/blog\/wp-json\/wp\/v2\/types\/resources"}],"wp:attachment":[{"href":"https:\/\/codesigncert.com\/blog\/wp-json\/wp\/v2\/media?parent=167"}],"wp:term":[{"taxonomy":"resources_category","embeddable":true,"href":"https:\/\/codesigncert.com\/blog\/wp-json\/wp\/v2\/resources_category?post=167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}