Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- On Error Resume Next
- ' Try to get running instance of Outlook
- Set outApp = GetObject(, "Outlook.Application")
- If Err.Number=429 Then
- Err.Clear
- MsgBox "Outlook isn't running so I'll try and start it"
- Set outApp = CreateObject("Outlook.Application")
- ' Check to see if Outlook started or not
- If outApp Is Nothing Then
- MsgBox "Outlook didn't start, sorry!"
- Else
- MsgBox "Looks like Outlook was started okay!"
- End If
- Else
- MsgBox "Outlook is already running, so I won't do anything"
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement