![]() |
create email, addresses to be added by user
Good Day,
Is there a way to email a specific sheet, but do not specify the email address? I want the user to be able to add the required email addresses because they will change. any help would be greatly appreciated. -- Carlee |
create email, addresses to be added by user
Hi Carlee,
See Ron de Bruin's sample code at: http://www.rondebruin.nl/mail/folder1/mail2.htm and http://www.rondebruin.nl/mail/folder2/mail2.htm In either case, insert the following code at the top of Ron's code: Dim Res As String Res = InputBox(Prompt:="Insert recipient's email address", _ Title:="Email Address") If Res = vbNullString _ Or Not Res Like "*@*" Then Exit Sub End If Then, for the first macro, replace: .SendMail ", _ with .SendMail Res, _ For the second macro, replace: .To = " with .To = Res --- Regards, Norman "Carlee" wrote in message ... Good Day, Is there a way to email a specific sheet, but do not specify the email address? I want the user to be able to add the required email addresses because they will change. any help would be greatly appreciated. -- Carlee |
create email, addresses to be added by user
Hi Norman,
Thanks for the help. I will put this to use. Question. Is it possible to just have the code create the email (in outlook, express or windows mail), without an email addresses. That way the user can select from previously saved email addresses in their email program? -- Carlee "Norman Jones" wrote: Hi Carlee, See Ron de Bruin's sample code at: http://www.rondebruin.nl/mail/folder1/mail2.htm and http://www.rondebruin.nl/mail/folder2/mail2.htm In either case, insert the following code at the top of Ron's code: Dim Res As String Res = InputBox(Prompt:="Insert recipient's email address", _ Title:="Email Address") If Res = vbNullString _ Or Not Res Like "*@*" Then Exit Sub End If Then, for the first macro, replace: .SendMail ", _ with .SendMail Res, _ For the second macro, replace: .To = " with .To = Res --- Regards, Norman "Carlee" wrote in message ... Good Day, Is there a way to email a specific sheet, but do not specify the email address? I want the user to be able to add the required email addresses because they will change. any help would be greatly appreciated. -- Carlee |
create email, addresses to be added by user
If you use the SendMail code see the tips page
http://www.rondebruin.nl/mail/tips1.htm You can use this Choose a address in the address book yourself. .SendMail "", "This is the Subject line" -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Carlee" wrote in message ... Hi Norman, Thanks for the help. I will put this to use. Question. Is it possible to just have the code create the email (in outlook, express or windows mail), without an email addresses. That way the user can select from previously saved email addresses in their email program? -- Carlee "Norman Jones" wrote: Hi Carlee, See Ron de Bruin's sample code at: http://www.rondebruin.nl/mail/folder1/mail2.htm and http://www.rondebruin.nl/mail/folder2/mail2.htm In either case, insert the following code at the top of Ron's code: Dim Res As String Res = InputBox(Prompt:="Insert recipient's email address", _ Title:="Email Address") If Res = vbNullString _ Or Not Res Like "*@*" Then Exit Sub End If Then, for the first macro, replace: .SendMail ", _ with .SendMail Res, _ For the second macro, replace: .To = " with .To = Res --- Regards, Norman "Carlee" wrote in message ... Good Day, Is there a way to email a specific sheet, but do not specify the email address? I want the user to be able to add the required email addresses because they will change. any help would be greatly appreciated. -- Carlee |
All times are GMT +1. The time now is 10:12 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com