{"id":239,"date":"2016-01-19T14:04:34","date_gmt":"2016-01-19T14:04:34","guid":{"rendered":"http:\/\/www.pkipartner.support\/?page_id=239"},"modified":"2016-01-28T12:18:41","modified_gmt":"2016-01-28T12:18:41","slug":"codesign-vba-signing-office-2k-xp-vba-macros","status":"publish","type":"page","link":"https:\/\/pkipartner.com\/support\/codesign-vba-signing-office-2k-xp-vba-macros\/","title":{"rendered":"Codesign &#8211; VBA signing Office 2K &#038; XP VBA Macros"},"content":{"rendered":"<h1>VBA signing Office 2K &amp; XP VBA Macros<\/h1>\n<p>Signing Microsoft Office 2K &amp; XP VBA Macros with a Comodo Code-Signing Certificate.<\/p>\n<p>Must have these:<\/p>\n<p>* Microsoft&#8217;s tool to import PVK files:<\/p>\n<p>Download the <a href=\"http:\/\/www.microsoft.com\/downloads\/details.aspx?familyid=F9992C94-B129-46BC-B240-414BDFF679A7&amp;displaylang=en\">PVK import tool from Microsoft<\/a> (pvkimprt.exe)<\/p>\n<p>* Your code signing certificate from Comodo (as PVK and SPC files).<br \/>\nIf you do not have these files. Follow these directions <a href=\"http:\/\/pkipartner.files.wordpress.com\/2014\/03\/how-to-convert-pfx-p12-file-to-spc-pvk-format.pdf\">here<\/a><\/p>\n<p>Procedure:<\/p>\n<p>1. Install pvkimport you downloaded from Microsoft. Remember the paths to where you<br \/>\ninstalled it (c:\\codesign\\). You may also copy your certificate\/key files to this directory<br \/>\n(mycert.spc &amp; mykey.pvk).<br \/>\n2. Open a command-prompt and change to the folder where you installed pvkimport.<br \/>\n(c:\\codesign\\).<br \/>\n3. Combine your SPC and PVK certificate\/key files that you received from Comodo into a<br \/>\nPFX file using pvkimport: (c:\\codesign&gt; pvkimprt -import \u2013pfx c:\\codesign\\mycert.spc<br \/>\nc:\\codesign\\mycert.pvk)<br \/>\nThis will start a wizard. Choose options:<br \/>\nYes, Export the Private Key (check)<br \/>\nInclude all Certificates in Path if possible (check)<br \/>\nEnable strong protection (uncheck)<br \/>\nDelete the private key if export is successful (uncheck)<br \/>\nEnter a password<br \/>\nChoose a location (c:\\firefoxext\\mycert.pfx)<br \/>\nFinish.<br \/>\n4. You can check the private key has been imported successfully by using MMC. Open MMC,<br \/>\nselect add\/remove snap in and select certificates. Opening your code signing certificate<br \/>\nshould show code signing usage and that you have the private key.<br \/>\n5. Within your Office 2K document, open the Visual Basic editor from the Tools \u2013 Macro<br \/>\nmenu.<br \/>\n6. Open the VBA project you wish to sign, and select Digital Signature from the Tools menu.<br \/>\n7. Select Chose from the Digital Signature window and your code signing certificate that you<br \/>\nwish to use to sign your VBA macro.<br \/>\n8. Click OK followed by Save, close to return to your Office document. Your macro is now<br \/>\ndigitally signed.<\/p>\n<p>Please note to add a friendly name to the certificate before using the certificate. How can this be changed?<\/p>\n<p>Friendly name within the MMC snap in window.<\/p>\n<p>Click the Start Button then select Run and type mmc Click File and select Add\/Remove Snap in Select Add,<br \/>\nselect Certificates from the Add Standalone Snap-in box and click Add Select Computer Account and click<br \/>\nFinish (note: This step is very important. It must be the computer account and not the current user account)<br \/>\nClose the Add Standalone Snap-in box, click OK in the Add\/Remove Snap in Return to the MMC To modify<br \/>\nthe friendly name go to the Personal, certificates Select the code sign cert and right click Properties<\/p>\n<p>You should now see the friendly name field which can be modified to suit your needs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>VBA signing Office 2K &amp; XP VBA Macros Signing Microsoft Office 2K &amp; XP VBA Macros with a Comodo Code-Signing Certificate. Must have these: * Microsoft&#8217;s tool to import PVK files: Download the PVK import tool from Microsoft (pvkimprt.exe) * Your code signing certificate from Comodo (as PVK and SPC\u2026<\/p>\n<p> <a class=\"continue-reading-link\" href=\"https:\/\/pkipartner.com\/support\/codesign-vba-signing-office-2k-xp-vba-macros\/\"><span>Continue reading<\/span><i class=\"crycon-right-dir\"><\/i><\/a> <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"_links":{"self":[{"href":"https:\/\/pkipartner.com\/support\/wp-json\/wp\/v2\/pages\/239"}],"collection":[{"href":"https:\/\/pkipartner.com\/support\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/pkipartner.com\/support\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/pkipartner.com\/support\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pkipartner.com\/support\/wp-json\/wp\/v2\/comments?post=239"}],"version-history":[{"count":3,"href":"https:\/\/pkipartner.com\/support\/wp-json\/wp\/v2\/pages\/239\/revisions"}],"predecessor-version":[{"id":609,"href":"https:\/\/pkipartner.com\/support\/wp-json\/wp\/v2\/pages\/239\/revisions\/609"}],"wp:attachment":[{"href":"https:\/\/pkipartner.com\/support\/wp-json\/wp\/v2\/media?parent=239"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}