for some reason I can't run VBA macros in Outlook, eventhough Security level is set to low.
any ideas?
for some reason I can't run VBA macros in Outlook, eventhough Security level is set to low.
any ideas?
Is your code in the ThisOutlookSession? Restarted Outlook?
VB/Office Guru™ (AKA: Gangsta Yoda™®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (VBA, VB 6, VB.NET, C#)
Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Star Wars Gangsta Rap • Reps & Rating Posts • VS.NET on Vista (New) • Multiple .NET Framework Versions (New) • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel Core 2 Extreme Ed., 2 WD Raptor 10K RPM 150 GB HDs RAID 1, 2 GBs DDR2 667 MHz RAM, 3 Viewsonic 17" LCDs, Windows Vista RTM, IE 7, Office 2007
Yes, and Yes.
I've reduced the code to:
Private Sub Application_Startup()
MsgBox "test"
end sub
still doesn't work
Try something like this.
Make sure when you restart Outlook its no longer running in the system tray or running processes list and security is Medium or Low for testing purposes only and your code looks like this....VB Code:
Option Explicit Private Sub Application_MAPILogonComplete() MsgBox "Test" End Sub
VB/Office Guru™ (AKA: Gangsta Yoda™®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (VBA, VB 6, VB.NET, C#)
Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Star Wars Gangsta Rap • Reps & Rating Posts • VS.NET on Vista (New) • Multiple .NET Framework Versions (New) • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel Core 2 Extreme Ed., 2 WD Raptor 10K RPM 150 GB HDs RAID 1, 2 GBs DDR2 667 MHz RAM, 3 Viewsonic 17" LCDs, Windows Vista RTM, IE 7, Office 2007
found the problem: Outlook was still runing as a process, although not running as an application.
thanks!
No prob.
But you should be using the MAPILogonComplete to do anything as its the last event to run and prevents most startup issues involving Outlook no being finished initializing before running vba or add-in code.
VB/Office Guru™ (AKA: Gangsta Yoda™®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (VBA, VB 6, VB.NET, C#)
Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Star Wars Gangsta Rap • Reps & Rating Posts • VS.NET on Vista (New) • Multiple .NET Framework Versions (New) • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel Core 2 Extreme Ed., 2 WD Raptor 10K RPM 150 GB HDs RAID 1, 2 GBs DDR2 667 MHz RAM, 3 Viewsonic 17" LCDs, Windows Vista RTM, IE 7, Office 2007
Thanks!!
Finally, after an hour of searching and asking around I stumble on this post.
I had the exact same problem. And as an additional side effect my Outlook couldn't sent it's mail either! (there were some tasks requests in my outbox created by a macro, I suppose perhaps that was why?)
What I did, I had to enable the macros via Tools > Trust Center (is that new?!) and Macro Security.
Thereafter I still had the problem despite restarting Outlook. The key was to also kill the Outlook process.
Thanks for the tip!
Sorry, I don't know if anyone is still monitoring this thread or not, but I hope so. I have the same problem, but I have ended all Outlook (and Microsoft Office just in case) processes and it's still not running. The code is good as far as I can tell, and I have checked my security settings, enabled macros, etc., etc., and I'm so frustrated. It was working last week, and now... It's just not! Someone please help!![]()
Hi,
In my opinion, you need to create a selfsigned certificate in order to be able to create/launch your macro on Outlook. It will work the first time you are coding but then you will be blocked.
It depends if you are doing this at home or at work but if you are at work I'm pretty sure you will need to create a cert.
To do so :
The "macro security settings" is fixed to : "notifications for digitally signed macros, all other macros disabled". You can create a certificate with SelfCert.exe ( Into C:\Program Files (x86)\Microsoft Office\Office14\)
Then to sign the macro you will have to put the certificate in the trusted publishers within the visual basic editor of Outlook.
Hope this help.