Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-18-2023, 11:33 PM
harry harry is offline Macro security issue Windows 10 Macro security issue Office 2019
Advanced Beginner
Macro security issue
 
Join Date: Jul 2010
Posts: 31
harry is on a distinguished road
Default Macro security issue

I am trying to set up a digital signature for a VBA project in Outlook, using the information on the following webpages, but it is not working.

Create and employ a digital certificate with SELFCERT.EXE
Signing your own macros with SelfCert.exe - HowTo-Outlook

Here is the procedure I used:

----------


- Create certificate "MyName" using selfcert.exe.
- Export certificate "MyName" from personal store to .cer file.
- Import certificate "MyName" from .cer file to trusted store.

- Go to Outlook > Developer > Visual Basic > Tools > Digital Signature > Sign As; click on Choose button. At this point, the certificate I created is displayed (there is no option to specify a store or certificate; the one I created is displayed automatically), and when I click on the link "Click here to view certificate properties", it appears to be the trusted one ("This certificate is intended for the following purposes: Ensures software came from software publisher ... ", etc.).

- Click on OK. It then says "The VBA project is currently signed as Certificate Name: MyName"

- Go to Outlook > Developer > Macro Security and select option "Notifications for digitally signed macros, all other macros disabled."

- Click on OK, close VBA, close Outlook, click on "Yes" when prompted "Do you want to save the VBA project 'VbaProject.OTM'?".

- Re-open Outlook.

- Go to Outlook > Developer > Visual Basic > Tools > Digital Signature. It says "The VBA project is currently signed as Certificate Name: [No certificate]", and macros will not run (it says "The macros in this project are disabled.")

----------
It appears the certificate selection is not being saved when closing Outlook or not loaded when re-opening Outlook?

How can I fix this?
Reply With Quote
  #2  
Old 01-19-2023, 12:21 AM
harry harry is offline Macro security issue Windows 10 Macro security issue Office 2019
Advanced Beginner
Macro security issue
 
Join Date: Jul 2010
Posts: 31
harry is on a distinguished road
Default

After some further research, I found a fix for this, on the following webpage.

Unable to sign Outlook 2010 VBAProject

The fix is to add an extra step (underlined below).

----------
- Create certificate "MyName" using selfcert.exe.
- Export certificate "MyName" from personal store to .cer file.
- Import certificate "MyName" from .cer file to trusted store.

- Go to Outlook > Developer > Visual Basic > Tools > Digital Signature > Sign As; click on Choose button. At this point, the certificate I created is displayed (there is no option to specify a store or certificate; the one I created is displayed automatically), and when I click on the link "Click here to view certificate properties", it appears to be the trusted one ("This certificate is intended for the following purposes: Ensures software came from software publisher ... ", etc.).

- Click on OK. It then says "The VBA project is currently signed as Certificate Name: MyName"

- Click on OK, then click on the Save icon (or File > Save, or Ctrl + S). (If this step is skipped, the digital signature is not saved.)

- Go to Outlook > Developer > Macro Security and select option "Notifications for digitally signed macros, all other macros disabled."

- Click on OK, close VBA, close Outlook, click on "Yes" when prompted "Do you want to save the VBA project 'VbaProject.OTM'?".

- Re-open Outlook.
----------

Now the macro will run without any security prompts.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro security issue Macro Security Warning yvessr Word VBA 2 05-13-2019 12:12 AM
Macro security issue Saving Macro to Normal - Security Warning for Every File josephsh Word VBA 2 11-14-2014 08:40 AM
Show/hide text macro and security issues? subspace3 Word VBA 1 10-05-2014 10:05 AM
Macro security issue Hiding text and macro security subspace3 Word VBA 4 10-05-2014 10:01 AM
Possible Security Issue? GarP Excel 0 04-08-2010 07:47 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:48 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft