Another mail question SOLVED

elgringo56

Well-known Member
Joined
Apr 15, 2002
Messages
869
When you send e-mail from a macro, a message comes up asking you to click "SEND" or DONT SEND. How can I test for which button is clicked so that I can then act differently for each one? What I am trying to do is as follows: Thru the day, a sheet gathers information on items in a store. At the end of the day, the operator sends this list by e-mail to the home office. Once the list is sent it gets cleared and the following day, it will again be added to. The problem is, The message that comes up gives the operator the choice of sending or not sending. If she accidently hits the dont send button, the list will be cleared and lost. Sooner or later, that will happen. I must, therefore, be able to tell if the dont send button is clicked so that I can inhibit clearing of my list. I hope this makes sence.
This message was edited by elgringo56 on 2002-08-25 19:41
This message was edited by elgringo56 on 2002-09-16 15:47
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
elgringo56,

Could You provide us with more information?
Is it via VBA and MS Outlook You working with or....

Kind regards,
Dennis
 
Upvote 0
I am working with Xp, Office 2000 and Outlook Express 6. The instruction used to send the mail is:

ActiveWorkbook.SendMail Recipients:="elgringo56@prodigy.net.mx", Subject:="From CENTRO to P.P."

When exicuted, a "canned" message box comes up showing "To:" (which is always empty) and "Subject" (which is correct) and two buttons. One is "Send" The other is "Do Not Send". I have searched the so called help files, I have searched sites, but can find no reference that tells me how I can test for which button I select. I am having a hard time believing that I am the only one in the whole world who would want to do something different if the e-mail was sent than if it was not sent, therefore I assume there must be a way to test for the condition, but I can't seem to locate it. Any help on this will be greatly appreciated.
This message was edited by elgringo56 on 2002-08-26 04:49
 
Upvote 0
elgringo56,

AS far as I know...
OE don´t have any object-library (like MS Outlook) we can't control / check the initiated mail-procedure.

Kind regards,
Dennis
 
Upvote 0
elgringo56,

Using XL 2000 (Swedish SR-1) and XL XP (English SP-2) with OE 6 I pasted Your snippet code (modified recipients) into a module, saved the workbook and run the procedure.

I received the dialogform:
Caption: Outlook Express
Text:
"A program is trying to send following message...."
"Do You want to send the message?"
Buttons:
Send / Send not

The only conclusion is, at least based on above information, it´s OE that create the message...

I'm running Windows 2000 SP-3 English version.

Kind regards,
Dennis
_________________
"Windows was not able to find any keyboard. Press F1-button to try again or F2-button for cancel."
This message was edited by XL-Dennis on 2002-08-26 06:26
 
Upvote 0
Thank you for your help, Dennis, yes, that is exactly what I got to. I guess I will have to find another way around it, perhaps another message box after the mail is sent asking the operator which button they had clicked on. Not to clean, but It will probably work most of the itme. Again, thank you very much
 
Upvote 0
I am bringing this back to the top hopeing that someone else may know a way to test as to which button was pressed when sending mail from Excel
 
Upvote 0
I am bringing this back to the top one more time in hopes someone might know of an answer. It is strange to me that I would be given a box with two choices but can't do anything with the choices.
 
Upvote 0

Forum statistics

Threads
1,213,484
Messages
6,113,924
Members
448,533
Latest member
thietbibeboiwasaco

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top