Discussion Locked
0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How to auto run a macro script in VBA of Microsoft outlook
5 replies
You posted this under Questions, which is where it properly belongs. Please don't post questions under Discussions, and don't post the same question in multiple places.
by bschaettle
Put your code in:
Private Sub Application_Startup()
...
End Sub
Check Tools+Macro+Security to be sure macros are allowed to run.
by aline
thx it's working but i still have one problem,
if I close the outlook from the task bar the macro stop running
by ts13831
Does anyone have thoughts as to why this Sub Application_Startup()doesn't work for me? I have Macro Security set to low. To test the sub, I inserted MSGBOX "Hello" between the two lines of code - nothing. I am trying to use the startup sequence to expose a VBA function within Outlook.
by aacinc
You can place code in the ThisOutlookSession.
Private Sub Application_MAPILogonComplete()
Call your macro1
Call your macro2
End Sub
This discussion is closed to new replies.
Trending Microsoft posts
Sort by Trending
Question Unanswered
Microsoft Certification Which Certification Matches Your Career Goal
0 helpful
0 replies
Question Unanswered
Microsoft Azure Certification Is It Worth It for an IT Career in 2026
0 helpful
0 replies
Question Locked
Biggest challenges when scaling Dynamics 365 implementations?
0 helpful
4 replies
Question Locked
Best Alternative to Microsoft Office for Lightweight Use?
0 helpful
5 replies
0 helpful
3 replies