Open Outlook
Hi All,
I just want to ensure that Outlook is open before I do other things. I tried a .bat file with the command below, but no luck. Can anyone tell me why, or offer a VBA script to do the same? TIA! CALL C:\Program Files\Microsoft Office\OFFICE11\Outlook.exe |
Open Outlook
Jeff
I think this will work Dim olApp As Outlook.Application On Error Resume Next Set olApp = GetObject(, "Outlook.Application") If Err.Number = 429 Then Set olApp = CreateObject("Outlook.Application") End If On Error GoTo 0 olApp.Visible = True -- Dick Kusleika Excel MVP Daily Dose of Excel www.dicks-blog.com JEFF wrote: Hi All, I just want to ensure that Outlook is open before I do other things. I tried a .bat file with the command below, but no luck. Can anyone tell me why, or offer a VBA script to do the same? TIA! CALL C:\Program Files\Microsoft Office\OFFICE11\Outlook.exe |
Open Outlook
You can use Shell Jeff
Shell "C:\Program Files\Microsoft Office\OFFICE11\Outlook.exe" -- Regards Ron de Bruin http://www.rondebruin.nl "JEFF" wrote in message ... Hi All, I just want to ensure that Outlook is open before I do other things. I tried a .bat file with the command below, but no luck. Can anyone tell me why, or offer a VBA script to do the same? TIA! CALL C:\Program Files\Microsoft Office\OFFICE11\Outlook.exe |
Open Outlook
Jeff,
You can have multiple instances of Outlook, so why not just create your own, non-visible instance and quit it when finished. Dim MyOutlook as Outlook.Application Set MyOutlook=New Outlook.Application NickHK "JEFF" wrote in message ... Hi All, I just want to ensure that Outlook is open before I do other things. I tried a .bat file with the command below, but no luck. Can anyone tell me why, or offer a VBA script to do the same? TIA! CALL C:\Program Files\Microsoft Office\OFFICE11\Outlook.exe |
All times are GMT +1. The time now is 01:15 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com