Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default SendMail error

I've got an Excel worksheet with the following VB code

Sub Button1_Click()
ThisWorkbook.SendMail ", _
"Timesheet"

MsgBox "Thank you, Your timesheet has been sent",
0, "Item Sent"

End Sub

When I click the submit button I get the following error

Run-time error '1004':
Method 'SendMail' of object '_Workbook' failed

I've looked on the MS Knowledge Base, and tried the
example code in Article 241421, and that came back
saying 'no mail client'.

I am running WinXP, Excel 2002, and Outlook 2002, if in
Excel I do file-send to it succesfully opens outlook, so
it must be seeing it as my default mail client.

Can anyone help with this, and give me some pointers?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default SendMail error

Try this

XL2002: "Send To Routing Recipient" Command Does Nothing
http://support.microsoft.com/default...b;en-us;296396

Post back please with the result

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"NeillA" wrote in message ...
I've got an Excel worksheet with the following VB code

Sub Button1_Click()
ThisWorkbook.SendMail ", _
"Timesheet"

MsgBox "Thank you, Your timesheet has been sent",
0, "Item Sent"

End Sub

When I click the submit button I get the following error

Run-time error '1004':
Method 'SendMail' of object '_Workbook' failed

I've looked on the MS Knowledge Base, and tried the
example code in Article 241421, and that came back
saying 'no mail client'.

I am running WinXP, Excel 2002, and Outlook 2002, if in
Excel I do file-send to it succesfully opens outlook, so
it must be seeing it as my default mail client.

Can anyone help with this, and give me some pointers?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default SendMail error

Thanks, just tried it, and the sendmail now works. I now
just need to work out why outlook is just leaving the
email in the outbox, and not sending it.


-----Original Message-----
Try this

XL2002: "Send To Routing Recipient" Command Does Nothing
http://support.microsoft.com/default.aspx?scid=kb;en-

us;296396

Post back please with the result

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"NeillA" wrote in message

...
I've got an Excel worksheet with the following VB code

Sub Button1_Click()
ThisWorkbook.SendMail ", _
"Timesheet"

MsgBox "Thank you, Your timesheet has been sent",
0, "Item Sent"

End Sub

When I click the submit button I get the following error

Run-time error '1004':
Method 'SendMail' of object '_Workbook' failed

I've looked on the MS Knowledge Base, and tried the
example code in Article 241421, and that came back
saying 'no mail client'.

I am running WinXP, Excel 2002, and Outlook 2002, if in
Excel I do file-send to it succesfully opens outlook,

so
it must be seeing it as my default mail client.

Can anyone help with this, and give me some pointers?



.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sendmail Eef New Users to Excel 4 March 23rd 09 05:55 PM
Sendmail Mattlynn via OfficeKB.com Excel Discussion (Misc queries) 4 August 8th 08 12:21 PM
sendmail Noemi Excel Discussion (Misc queries) 0 February 10th 06 01:59 AM
Ron DeBruin's Sendmail Ken G. Excel Discussion (Misc queries) 1 October 18th 05 03:54 PM
Use a variable with Sendmail ? Ron de Bruin Excel Programming 1 July 31st 03 11:55 PM


All times are GMT +1. The time now is 08:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"