Email via Access when environment varies

Christine Pearc

Christine
Local time
Today, 21:19
Joined
May 13, 2004
Messages
111
Can someone please help with this in a hurry - just learned the Big Guy is coming in from the states for a demo of my system and we just discovered big probs with email - critical to the entire programme!

The app is supposed to automatically send email (with a report attached) to people specified in the code after a form's command button's On Click event. Sending the email must be completely transparent to the user so they cannot cancel the email, edit it, etc. The code is

DoCmd.SendObject acSendNoObject, , , strMgrAddress, , , mTitle, mMsg, False

After some tests using different PCs (the app will be used throughout the company) we're seeing different results on different systems:

1. If the user doesn't have Outlook open...
...the user gets a message "Choose Profile". Outlook is displayed in the Profile Name Box. Clicking the Option "Set as Default Profile" in this message box doesn't do anything. It also doesn't matter if the default profile is set to Outlook from within Outlook.

2. If Outlook is not open...
...one of two things can happen: a pop-up "Choose Profile" message appears OR a popup for the Internet Connection Wizard appears.

3. Sometimes Outlook's security warning appears ("Another application is trying to send email..."), and sometimes it doesn't!! I've heard that this message is automatic in Outlook and can be turned off by our system administrator, but he hasn't turned anything off, so why the message appears intermittantly is baffeling. When the message does appear, however,... we'll we don't want it to, since the user could potentially cancel the email.

3. If the user is using a laptop or if the PC is configured so the user has an option for connecting...
...a Microsoft Exchange Server prompt asks them if they want to connect to internet or work off-line. If they choose to work off-line, then the email can't be sent! I suppose we can't force them to connect, but then there must be some sort of tracking to show that the email wasn't sent.

We are using Access 2002 SP-2. Some systems have XP, others have Windows 2000. All have Outlook 2002 SP-2.

I have seen some code that has "Dim objOutlook As Outlook.Application", but wonder what this does that SendObject does not. Could "Dim objOutlook As Outlook.Application" solve some of these problems? And, if so, could someone provide the code, as I can't seem to find it again and anyway, when I first saw it, the code was actually doing a heck of alot more than I need. Please be gentle with your response - I'm VERY green at all this!

Thanks to all,
Christine
 
Still Need Urgent Help: Email via Access when environment varies

Michael, thank you very much for your sample application - it's quite nice! However, my little programme does much the same thing, but behind the scenes, i.e. the To address, CC address, subject, attachment, and message are all coded for the user so they don't have to enter anything.

Also, your programme produces all the same dialogs and problems as I'm experiencing with the "DoCmd.SendObject" command in that, if Outlook is not open, it asks for the profile, the email can be cancelled, etc. I need everything concering the email to be hidden from the user.

Could someone take my plea on board? - getting desperate here!!

Ta,
Christine
 

Users who are viewing this thread

Back
Top Bottom