Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro that is to automatically send the
worksheet to a particular email address. At the end of a macro, I have written an InputBox for the user to enter his email address if he wants a copy. I want the worksheet to be sent to the first particular address (same one every time, hard coded in) as well as the address input by the user. This seems like it should be easy. I'm using .SendMail How do I combine the two addresses? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something like this:
Sub SendSheet() Dim rec(2) As String rec(1) = " rec(2) = Application.InputBox("Type your e-mail address to get a copy") ActiveWorkbook.SendMail Recipients:=rec(), Subject:="My subject" End Sub Jan "Clapp" skrev i en meddelelse ... I have a macro that is to automatically send the worksheet to a particular email address. At the end of a macro, I have written an InputBox for the user to enter his email address if he wants a copy. I want the worksheet to be sent to the first particular address (same one every time, hard coded in) as well as the address input by the user. This seems like it should be easy. I'm using .SendMail How do I combine the two addresses? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you so much for your help, but I am getting:
Run-time error '1004' General Mail Failure ??? -----Original Message----- Try something like this: Sub SendSheet() Dim rec(2) As String rec(1) = " rec(2) = Application.InputBox("Type your e-mail address to get a copy") ActiveWorkbook.SendMail Recipients:=rec(), Subject:="My subject" End Sub Jan "Clapp" skrev i en meddelelse ... I have a macro that is to automatically send the worksheet to a particular email address. At the end of a macro, I have written an InputBox for the user to enter his email address if he wants a copy. I want the worksheet to be sent to the first particular address (same one every time, hard coded in) as well as the address input by the user. This seems like it should be easy. I'm using .SendMail How do I combine the two addresses? . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
NO wait! Sorry, I had mistyped something. Your method
worked! Thank you! -----Original Message----- Thank you so much for your help, but I am getting: Run-time error '1004' General Mail Failure ??? -----Original Message----- Try something like this: Sub SendSheet() Dim rec(2) As String rec(1) = " rec(2) = Application.InputBox("Type your e-mail address to get a copy") ActiveWorkbook.SendMail Recipients:=rec(), Subject:="My subject" End Sub Jan "Clapp" skrev i en meddelelse ... I have a macro that is to automatically send the worksheet to a particular email address. At the end of a macro, I have written an InputBox for the user to enter his email address if he wants a copy. I want the worksheet to be sent to the first particular address (same one every time, hard coded in) as well as the address input by the user. This seems like it should be easy. I'm using .SendMail How do I combine the two addresses? . . |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Glad I Could help :-)
Jan-- "Clapp" skrev i en meddelelse ... NO wait! Sorry, I had mistyped something. Your method worked! Thank you! -----Original Message----- Thank you so much for your help, but I am getting: Run-time error '1004' General Mail Failure ??? -----Original Message----- Try something like this: Sub SendSheet() Dim rec(2) As String rec(1) = " rec(2) = Application.InputBox("Type your e-mail address to get a copy") ActiveWorkbook.SendMail Recipients:=rec(), Subject:="My subject" End Sub Jan "Clapp" skrev i en meddelelse ... I have a macro that is to automatically send the worksheet to a particular email address. At the end of a macro, I have written an InputBox for the user to enter his email address if he wants a copy. I want the worksheet to be sent to the first particular address (same one every time, hard coded in) as well as the address input by the user. This seems like it should be easy. I'm using .SendMail How do I combine the two addresses? . . |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry, I spoke too soon.
In the SendMail statement I had written rec(2) instead of rec(). When I corrected this, it worked. Several times in a row. Then I added the following line at the top of my macro: Application.ScreenUpdating = False That's all I added, and the next time I ran the macro, I got the General Mail Failure error (1004). I removed the statement but keep getting the error. I've even rebooted the machine. Now, I cannot make it work again. Any ideas? -----Original Message----- Glad I Could help :-) Jan-- "Clapp" skrev i en meddelelse ... NO wait! Sorry, I had mistyped something. Your method worked! Thank you! -----Original Message----- Thank you so much for your help, but I am getting: Run-time error '1004' General Mail Failure ??? -----Original Message----- Try something like this: Sub SendSheet() Dim rec(2) As String rec(1) = " rec(2) = Application.InputBox("Type your e-mail address to get a copy") ActiveWorkbook.SendMail Recipients:=rec(), Subject:="My subject" End Sub Jan "Clapp" skrev i en meddelelse ... I have a macro that is to automatically send the worksheet to a particular email address. At the end of a macro, I have written an InputBox for the user to enter his email address if he wants a copy. I want the worksheet to be sent to the first particular address (same one every time, hard coded in) as well as the address input by the user. This seems like it should be easy. I'm using .SendMail How do I combine the two addresses? . . . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Schedueled Auto Send .xls File to Receipients | Excel Discussion (Misc queries) | |||
mail merge multiple lines in an e-mail | Excel Discussion (Misc queries) | |||
Truncated filenames by receipients | Excel Discussion (Misc queries) | |||
Editing Multiple E-Mail Addresses... | Excel Worksheet Functions | |||
mail worksheet (multiple) | Excel Programming |