View Full Version : [SOLVED:] Outlook Vba code doesn't work when I restart my machine.
Jagdev
06-11-2015, 09:49 AM
Hi Experts,
I have a VBA code saved in ThisOutlookSession. Whenever I restart or start the outlook app it doesn't work. Am I doing something wrong with it. I want it to run when the app gets start.
Regards,
JD
gmayor
06-11-2015, 10:03 PM
It probably relates to security issues.
In the Office folder you will find selfcert.exe which will enable you to create a certificate for your own macros.
Having done that, set the macro security in Outlook to provide warnings for all macros, then start the VBA editor and from Tools > Digital Signatures, add your newly created signature to the project.
Close Outlook saving the project at the warning.
Re-open Outlook and you will get a security prompt for the vbaproject. From that dialog choose the option to trust items from the publisher (your certificate).
Thereafter the macros should work normally without prompts.
Jagdev
06-12-2015, 07:31 AM
Hi Gmayor
I followed the above steps and created Digital certificate, but after I restart the macrosoft outlook 2010 it throws the attached message and the macro doesn’t work.
Please let me know what I am doing wrong here.
Regards,
JD
Jagdev
06-12-2015, 08:13 AM
Hi Gmayor
I am using "Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)" in ThisOutlookSession do I have to add any reference to it.
Regards,
JD
Jagdev
06-15-2015, 02:42 AM
Hi Gmayor
I tried the entire process again today and it worked. Thanks for your help on this.
Regards,
JD
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.