Outbox not responding

  • Thread starter Thread starter Rose B
  • Start date Start date
R

Rose B

I have a MS Access application which uses VB to construct/send emails.
The application is used by some users with Office 2007 and some using Office
2003.
The Office 2007 users have "ClickYes" software from ContextMagic installed.
The MS Access application is distributed as 2007 runtime.

What I have found is that all is well for Office 2007 users all of the time,
and for Office 2003 users if Outlook is closed when the email is sent
(ClickYes accepting the security alert boxes). However, if a Office 2003 user
has Outlook open (which is normal) when the .Send command is issued from VB
then they will see a box stating that the "action cannot be completed becuase
the Outbox - Microsoft Outlook application (Outbox - Microsoft Outlook) is
not responding. Cjoose Switch To to activate Outbox...........". The user can
then click one of two buttons - Switch To... or Retry. Whichever they click
dies the trick and the application continues OK.

Does anyone know of any way of stopping this box from appearing and the
processing continuing without user intervention?

(I will post this in the Access Programming forum as well).
 
For me it sounds like you should ask the ClickYes people.

--
Best regards
Michael Bauer - MVP Outlook
Category Manager - Manage and share your categories:
SAM - The Sending Account Manager:
<http://www.vboffice.net/product.html?lang=en>


Am Tue, 30 Mar 2010 15:42:01 -0700 schrieb Rose B:
 
Yeah, I did that - and they said that their product could not code around
this message. The strange thing is that if you use Mail Merge to generate
Outlook messages from Access, this message does not appear (and of course the
security messages are handled OK by ClickYes), so I thought that there must
be some kind of flag that is being set by Mail Merge and that I am missing in
my VB statement.
 
It's not a flag. It's a message created using Simple MAPI that is causing
the problems. You're probably using DoCmd to send the mail? You would need
to start Outlook using automation code and use the Outlook object model to
avoid the problem and to have ClickYes work correctly.
 
The code that I am using follows..... which I think is the kind of thing that
you are suggesting?

Dim appOutlook As Object
Dim appOutlookMsg As Object
Dim appOutlookRecip As Object

Set appOutlook = CreateObject("Outlook.Application")
Set appOutlookMsg = appOutlook.CreateItem(olMailItem)
strRecipient = "(e-mail address removed)"

With appOutlookMsg
Set appOutlookRecip = .Recipients.Add(strRecipient)
appOutlookRecip.Type = olTo
.Importance = 2
.Subject = "Test Msg"
.Body = "Dear You, this is a test message from Access 2007"
.Send
End With
 
That is Outlook automation, not Simple MAPI, so it is what I was talking
about. I'm really surprised that ClickYes can't handle that.

You might want to try using GetObject() to see if you can pick up an
existing Outlook session before you use CreateObject(), perhaps ClickYes can
handle that.

I don't use ClickYes, nor do most Outlook developers. I consider it a
security risk, and we have Redemption (www.dimastr.com/redemption) to avoid
the security and provide a whole heck of a lot more functionality than
ClickYes.
 
Thanks Ken.... I solved it!!! (And a real Doh! moment it was too). Somehow
the OLE Automation library had been dropped. Once I put that into the
References all was OK.

I had looked at Redemption before, but the folk I have been doing this for a
re a charity and there are only a couple of users so they didn't really want
to be buying software. I have also looked today at MAPILab's Advanced Outlook
Security, which looks much more rich in functionality. At least with ClickYes
whether it is Active or not can be controlled through VB so it won't just
click through all the time.

Anyway, all's well - thanks for your time.
 
If you do more Outlook projects, Redemption for sure will pay off. There'd
be no need to have one customer pay for the entire cost.

--
Best regards
Michael Bauer - MVP Outlook
Category Manager - Manage and share your categories:
SAM - The Sending Account Manager:
<http://www.vboffice.net/product.html?lang=en>


Am Wed, 31 Mar 2010 09:44:01 -0700 schrieb Rose B:
 
Back
Top