Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Method _MailEnvelope failed
I recently upgraded one of our machines that was becoming increasingly
flaky. The machine runs a complex series of Excel macros at the end of the day and sends out a bunch of worksheets in mail. The code uses... With ActiveSheet.MailEnvelope.Item .Recipients.Add "someone" .Subject = "New entries and changes for " & Format(datetrade, "mmm-dd-yyyy") .Send End With This code has worked fine on the old machine, as well as most of the other machines in the office. However, it does not work on the new one, and instead reports a "Method _MailEnvelope failed". 1) Everyone is running Office 2003 SP3, versions are all equal 2) I have included a Reference to Outlook (even though I never had to before) I noticed a couple of comments on this problem that suggested that Outlook had to be the default program. To test this I went to a web page that had a mailto and clicked -- Word came up! This might be the problem, how do I fix this? Maury |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Method _MailEnvelope failed
I checked in Internet Options, and "Microsoft Office Outlook" is
selected as the mail program. Maury |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Method _MailEnvelope failed
when we moved some "production" excel workbooks to a ne wbuild, we found that
an application (in our case VNC) caused the issue. Stopping iot solved the problem, though we never really knew what it was. Check what other apps are running "Maury Markowitz" wrote: I recently upgraded one of our machines that was becoming increasingly flaky. The machine runs a complex series of Excel macros at the end of the day and sends out a bunch of worksheets in mail. The code uses... With ActiveSheet.MailEnvelope.Item .Recipients.Add "someone" .Subject = "New entries and changes for " & Format(datetrade, "mmm-dd-yyyy") .Send End With This code has worked fine on the old machine, as well as most of the other machines in the office. However, it does not work on the new one, and instead reports a "Method _MailEnvelope failed". 1) Everyone is running Office 2003 SP3, versions are all equal 2) I have included a Reference to Outlook (even though I never had to before) I noticed a couple of comments on this problem that suggested that Outlook had to be the default program. To test this I went to a web page that had a mailto and clicked -- Word came up! This might be the problem, how do I fix this? Maury |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Method _MailEnvelope failed
Sounds like the references are crosses. I believe you will have to clear
those references and then reset them. Not a bid deal though. Follow these instructions (from the Access DG; should be same for Excel): You could try using Late Binding, so that you don't need to set a reference at all. If you use Late Binding instead of setting a reference, delete all references to all objects; Word, excel, Outlook. References Problem!!! This can be caused by differences in either the location or file version of certain files between the machine where the application was developed, and where it's being run (or the file missing completely from the target machine). Such differences are common when new software is installed. On the machine(s) where it's not working, open any code module (or open the Debug Window, using Ctrl-G, provided you haven't selected the "keep debug window on top" option). Select Tools | References from the menu bar. Examine all of the selected references. If any of the selected references have "MISSING:" in front of them, unselect them, and back out of the dialog. If you really need the reference(s) you just unselected (you can tell by doing a Compile All Modules), go back in and reselect them. If none have "MISSING:", select an additional reference at random, back out of the dialog, then go back in and unselect the reference you just added. If that doesn't solve the problem, try to unselect as many of the selected references as you can (Access may not let you unselect them all), back out of the dialog, then go back in and reselect the references you just unselected. (NOTE: write down what the references are before you delete them, because they'll be in a different order when you go back in) Regards, Ryan--- -- RyGuy "Maury Markowitz" wrote: I checked in Internet Options, and "Microsoft Office Outlook" is selected as the mail program. Maury |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Method _MailEnvelope failed
Hi Maury
See http://www.rondebruin.nl/mail/problems.htm And the code on this page http://www.rondebruin.nl/mail/folder3/mailenvelope.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Maury Markowitz" wrote in message ... I recently upgraded one of our machines that was becoming increasingly flaky. The machine runs a complex series of Excel macros at the end of the day and sends out a bunch of worksheets in mail. The code uses... With ActiveSheet.MailEnvelope.Item .Recipients.Add "someone" .Subject = "New entries and changes for " & Format(datetrade, "mmm-dd-yyyy") .Send End With This code has worked fine on the old machine, as well as most of the other machines in the office. However, it does not work on the new one, and instead reports a "Method _MailEnvelope failed". 1) Everyone is running Office 2003 SP3, versions are all equal 2) I have included a Reference to Outlook (even though I never had to before) I noticed a couple of comments on this problem that suggested that Outlook had to be the default program. To test this I went to a web page that had a mailto and clicked -- Word came up! This might be the problem, how do I fix this? Maury |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Method _MailEnvelope failed
Ron: I believe I used your code examples when I first made this
code... so it's not a coding problem :-) I think it has something to do with Word coming up as the mail editor. The setting is not in Internet Options though. Maury |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Method _MailEnvelope failed
Check out the register if Outlook is already your default mail program
http://www.rondebruin.nl/mail/problems.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Maury Markowitz" wrote in message ... Ron: I believe I used your code examples when I first made this code... so it's not a coding problem :-) I think it has something to do with Word coming up as the mail editor. The setting is not in Internet Options though. Maury |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Method "Method 'Open' of object 'Workbooks' failed | Excel Programming | |||
copy method failed | Excel Programming | |||
Method range failed | Excel Programming | |||
Copy method failed | Excel Programming | |||
Copypicture method failed | Excel Programming |