G
Guest
Hello,
I have an Access application running on a server where the user can send an
email to an Outlook user from Access. This all works fine except sometimes
the user gets a message that says:
The action cannot be completed because the other application is busy.
Choose switch to to activate the busy application and correct the problem.
Then the database hangs. It almost seems like there is a window somewhere
that requires a response.
My questions is, do I need to 'test' for Outlook being open before I create
a new instance? If so, how is that done? Has anyone encoutered this error
before?
My code is as follows:
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
'Create the Outlook session
Set objOutlook = New Outlook.Application
'Create message
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
'set the recipients
Set objOutlookRecip = .Recipients.Add(EmplEmail)
objOutlookRecip.Type = olTo
'set the subject, body, etc.
.Subject = .....
MsgText = ....
.Body = MsgText
For Each objOutlookRecip In .Recipients
If Not objOutlookRecip.Resolve Then
objOutlookMsg.Display
End If
Next
.Send
End With
Thank you very much.
Debbie
I have an Access application running on a server where the user can send an
email to an Outlook user from Access. This all works fine except sometimes
the user gets a message that says:
The action cannot be completed because the other application is busy.
Choose switch to to activate the busy application and correct the problem.
Then the database hangs. It almost seems like there is a window somewhere
that requires a response.
My questions is, do I need to 'test' for Outlook being open before I create
a new instance? If so, how is that done? Has anyone encoutered this error
before?
My code is as follows:
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
'Create the Outlook session
Set objOutlook = New Outlook.Application
'Create message
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
'set the recipients
Set objOutlookRecip = .Recipients.Add(EmplEmail)
objOutlookRecip.Type = olTo
'set the subject, body, etc.
.Subject = .....
MsgText = ....
.Body = MsgText
For Each objOutlookRecip In .Recipients
If Not objOutlookRecip.Resolve Then
objOutlookMsg.Display
End If
Next
.Send
End With
Thank you very much.
Debbie