General discussion

Locked

how to auto run a macro from outlook?

By aline ·
How to auto run a macro script in VBA of Microsoft outlook

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Double-posted.

by CharlieSpencer In reply to how to auto run a macro f ...

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.

Collapse -

Attach to Application Startup event

by bschaettle In reply to Double-posted.

Put your code in:

Private Sub Application_Startup()
...
End Sub

Check Tools+Macro+Security to be sure macros are allowed to run.

Collapse -

thx a million

by aline In reply to Attach to Application Sta ...

thx it's working but i still have one problem,
if I close the outlook from the task bar the macro stop running

Collapse -

Application_Startup Won't Work

by ts13831 In reply to Attach to Application Sta ...

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.

Collapse -

Macro On Oultook Startup

by aacinc In reply to Application_Startup Won't ...

You can place code in the ThisOutlookSession.

Private Sub Application_MAPILogonComplete()

Call your macro1
Call your macro2

End Sub

Back to Microsoft Forum
5 total posts (Page 1 of 1)  

Brands Forums