SendMail Problem

barkley

Board Regular
Joined
Mar 31, 2003
Messages
148
Hi
I am successfully using sendmail commands on almost every PC in the company, besides one.
I used the simple code below to test the PC, but it dislikes the SendMail line. The code works fine on my machine but not on the other.
I have checked the Outlook 10.0 Library but cannot work out what else could affect this.
I've run it with both outlook open and closed, and if closed it fires up Outlook, so it knows exactly what to do, I get the warning that a program is sending mail, but after clicking Yes, the runtime error occurs.

Code:
Sub SimpleSend() 

Sheets("sheet1").Copy 
ActiveWorkbook.SendMail Recipients:="email_address@hotmail.com", Subject:="Testing" 

'Still no body text! 

'BUT THIS ONE SENDS WITHOUT REVIEWING THE MESSAGE (Can be good or bad) 

End Sub

"Runtime Error 1004" - on the SendMail Line

Does anyone have any other ideas what could be causing this? I am baffled. Is there a setting in Outlook that needs to be set? Or am I missing a second Object Library on this machine?

Thanks for reading.
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
I don't know a solution, but my current system is doing that as well. I can use the sendmail command as long as I don't select an email address. Otherwise it errors out with a 1004 error. I think it has to do with my security settings on my win2000 machine or the way Outlook was install on it. (It was 98, and the command worked fine then). If you find a solution, I would be very happy to hear about it.

PS-I also had a an access database that tries to access the personal address book that stopped working with my Upgrade. That problem with the fact that I can use the sendmail function without a user leads me to believe it has to do with the personal address book.
 
Upvote 0
Re: SendMail Problem - solved

:oops:
Right, I've found out what the problem was and thought I'd post here incase anyone else has exactly the same problem as I did.
The answer to my problem was the embarassing fact that the user had reached the limit on their mailbox size...
 
Upvote 0

Forum statistics

Threads
1,213,484
Messages
6,113,920
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