If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
terminate the routine if outlook is not available
This code forms part of a routine that will be running on some computers
that have Outlook 2003 and some that have Outlook Web Access for Exchange 2003. DimOutAppAsOutlook.Application DimOutMailAsOutlook.MailItem SetOutApp=CreateObject("Outlook.Application") SetOutMail=OutApp.CreateItem(olMailItem) Can I add something to the above code to terminate the routine if outlook is not available? Please feel free to contribute is you have an ideas. |
Ads |
#2
|
|||
|
|||
terminate the routine if outlook is not available
Am Thu, 27 Apr 2006 06:54:22 +1000 schrieb fitful_thought:
A simle error handler does the trick: On Error Resume Next Dim OutApp AsOutlook.Application Dim OutMail AsOutlook.MailItem Set OutApp=CreateObject("Outlook.Application") If Not OutApp Is Nothing Then Set OutMail=OutApp.CreateItem(olMailItem) Else ' Not available MsgBox Err.Description Endif -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- This code forms part of a routine that will be running on some computers that have Outlook 2003 and some that have Outlook Web Access for Exchange 2003. DimOutAppAsOutlook.Application DimOutMailAsOutlook.MailItem SetOutApp=CreateObject("Outlook.Application") SetOutMail=OutApp.CreateItem(olMailItem) Can I add something to the above code to terminate the routine if outlook is not available? Please feel free to contribute is you have an ideas. |
#3
|
|||
|
|||
terminate the routine if outlook is not available
Thank you Michael.
DL "Michael Bauer" wrote in message ... Am Thu, 27 Apr 2006 06:54:22 +1000 schrieb fitful_thought: A simle error handler does the trick: On Error Resume Next Dim OutApp AsOutlook.Application Dim OutMail AsOutlook.MailItem Set OutApp=CreateObject("Outlook.Application") If Not OutApp Is Nothing Then Set OutMail=OutApp.CreateItem(olMailItem) Else ' Not available MsgBox Err.Description Endif -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- This code forms part of a routine that will be running on some computers that have Outlook 2003 and some that have Outlook Web Access for Exchange 2003. DimOutAppAsOutlook.Application DimOutMailAsOutlook.MailItem SetOutApp=CreateObject("Outlook.Application") SetOutMail=OutApp.CreateItem(olMailItem) Can I add something to the above code to terminate the routine if outlook is not available? Please feel free to contribute is you have an ideas. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
terminate the routine if outlook is not available | fitful_thought | Outlook - General Queries | 1 | April 26th 06 02:01 PM |
Outlook calendar should allow colouring days to follow a routine | MartinD | Outlook - Calandaring | 1 | April 14th 06 06:24 AM |