Quantcast
Viewing all articles
Browse latest Browse all 3066

Programmatically take OL offline

Looking for a way to control OL off-line status.

I have tried:

Set oOL = GetObject(, "Outlook.Application")
Set objCBs = oOl.Application.ActiveExplorer.CommandBars
objCBs.FindControl(, 5613).Execute
Set oOL = Nothing

This code DOES work, but after calling it Outlook does not exit correctly. It remains open in Task Manager. This behavior is present in both OL2003 and 2010, Win XP and Win7.

I have tried calling the code from within OL VBA, VB6 and VBS all hang Outlook when it closes.

Is there another way to programmatically take OL offline, or a way to get OL to close correctly after calling?

Viewing all articles
Browse latest Browse all 3066

Trending Articles