I have your code working successfully on my machine (sent a message to myself).
I will get back to you shortly...my problem now is to get the error message to show, before I can solve the workaround.
Stand By....
OK, here goes:
I have a legacy VB6 application that is run on laptop computers by field reps while disconnected from the internet and the corporate network. I added a form to allow these reps to create feedback on usage of the app which I want to then send to a central mailbox on the corporate Exchange server. These reps connect to the corporate network from home each night using VPN, at which time they connect to the corporate Exchange server and send/receive email. My brilliant plan was to create these feedback messages in the Outbox of the Outlook 2003 they have installed on their laptops and then have these messages delivered when they connect to the corporate network each night. Sounds simple, right?
To get by the Outlook security warning I am using Outlook Redemption, a fantastic little piece of software if I ever saw one. The problem I am running into is that when I create the email message in Outlook, I get a message saying:
"You are not connected to your Exchange Server. Would you like to work offline?"
If you click yes the message is created in the Outbox and delivered when you connect to the corporate network. However, I would really like to avoid getting this message if at all possible.
Can someone help me with this? The relevant code is shown below.
Thanks in advance,
Kevin
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Have a look at the great addin called "ClickYesPro" at the following website:
There is a free working version available for you to test.
It may solve your problem.
It also has a DLL to incorporate in your code.
I( am not sure if it is what you are after, but of the warning message comes from Outlook, then I think that is your solution. All security messages from Outlook are intercepted and I think the DLL can handle other messages occurring during email transmission.
Sample declaration code showing below for inclusion of the DLL methods and properties into your code if required.
To your project add reference:
" ClickYes Pro.Com Addin Library" and register the DLL via RegSvr32.exe
I have asked their great support team to advice me of documentation for the DLL'
I am still working on this fix.....Stand By
craisin,
Funny, I had just tried that tact when I read your message. Using this code, the message is created in the Outbox just fine, but it isn't sent automatically when I connect to the Exchange server. Instead, I have to bring up the message manually and click the Send button. My guess is that a status bit of some sort gets flipped when you invoke Send and that tells Outlook that it is ready to send out.
It appears that it is the nature of the beast that when using Outlook 2003 in Exchange Server mode while disconnected from the server, there is no way to avoid that message about working Offline if I want to send an email message programmatically.
Thanks very much for your help craisin, I'll take your reply as the solution...
Best regards,
Kevin
You should not need to bring up the message.
Just clicking "Send" within Outlook will send any messages in the Outbox.
So when the next connects to the server to receive their email and they click Send/Receive, their pending feedbacks will automatically despatch.
Good result for your problem workaround :-)
Buy the way, did you have a look at "ClickYes" anyway? It is a great addon in addition to Redemption (which I also purchased).
Business Accounts
Answer for Membership
by: mdouganPosted on 2009-09-23 at 06:44:02ID: 25402948
Working with the Outlook object model is a pain in the neck because of all of the messages and warnings it generates. In the past, I've switched to using CDO or CDONTS rather than Outlook, but you may be too far in to want to consider that.
look/offli ne.asp
I searched around a bit, but couldn't find any property in the Outlook object model that you could set to suppress this message... Excel has such a property, so I'd hoped Outlook did too.
The only possible option I came across is that you can setup a new mailbox that works offline by default, then programatically login to that mailbox, rather than the user's default mailbox (you get the default mailbox by not passing anything to the logon method).
That should allow you to work without getting the Work Offline message. However, the only thing I'm not sure about is when the messages will actually be sent.... You can read a bit about setting up the mailbox here:
http://www.sembee.info/out
Good Luck!