Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macros to send email automatically


I was creating a spreadsheet (forms) to collect feedback and I put a
button on called "submit" to get people submit the data...

The code is as follows:

Sub Button1_Click()

MsgBox "Survey Completed. Thanks a lot!"

ActiveWorkbook.Save

Application.Dialogs(xlDialogSendMail).Show

End Sub

In this way I can get the email program open automatically when people
click the button.

But Can I actually modify the code somehow and get my email address
filled and send the email out automatically?

Thanks, P


--
prague
------------------------------------------------------------------------
prague's Profile: http://www.excelforum.com/member.php...o&userid=30172
View this thread: http://www.excelforum.com/showthread...hreadid=513097

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macros to send email automatically


Hi,

I have a feeling it depends what e-mail system you are using, but as a
starting point try the following:

ActiveWorkbook.SendMail "Recipients name", "E-Mail subject"

Replace the Recipeints name and E-Mail subject with strings that meet
these criteria.

If thaat doesn't work can you let me know what E-Mail package you are
using - Outlook, Lotus Notes etc.. and I can have another look at it.

Regards,

Adam


--
Adamaths
------------------------------------------------------------------------
Adamaths's Profile: http://www.excelforum.com/member.php...o&userid=31580
View this thread: http://www.excelforum.com/showthread...hreadid=513097

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Macros to send email automatically

We use an e-mail package called Groupwise;
What would one do in this case?
TIA,


"Adamaths" wrote in
message ...

Hi,

I have a feeling it depends what e-mail system you are using, but as a
starting point try the following:

ActiveWorkbook.SendMail "Recipients name", "E-Mail subject"

Replace the Recipeints name and E-Mail subject with strings that meet
these criteria.

If thaat doesn't work can you let me know what E-Mail package you are
using - Outlook, Lotus Notes etc.. and I can have another look at it.

Regards,

Adam


--
Adamaths
------------------------------------------------------------------------
Adamaths's Profile:
http://www.excelforum.com/member.php...o&userid=31580
View this thread: http://www.excelforum.com/showthread...hreadid=513097



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Macros to send email automatically

Try it.

--
Regards,
Tom Ogilvy

"Jim May" wrote in message
news:Z1_If.182519$oG.163225@dukeread02...
We use an e-mail package called Groupwise;
What would one do in this case?
TIA,


"Adamaths" wrote in
message ...

Hi,

I have a feeling it depends what e-mail system you are using, but as a
starting point try the following:

ActiveWorkbook.SendMail "Recipients name", "E-Mail subject"

Replace the Recipeints name and E-Mail subject with strings that meet
these criteria.

If thaat doesn't work can you let me know what E-Mail package you are
using - Outlook, Lotus Notes etc.. and I can have another look at it.

Regards,

Adam


--
Adamaths
------------------------------------------------------------------------
Adamaths's Profile:
http://www.excelforum.com/member.php...o&userid=31580
View this thread:

http://www.excelforum.com/showthread...hreadid=513097





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Macros to send email automatically

Thanks Tom;
I'm (still) always afraid that when I try something like this
THE ENTIRE (Office) SYSTEM will go down and
within 2 or 3 minutes I'll be surrounded by several Firemen - and/or the
Hook and Ladder crew -- LOL
Oh well, what the heck,, I'll try it !!
Jim


"Tom Ogilvy" wrote in message
...
Try it.

--
Regards,
Tom Ogilvy

"Jim May" wrote in message
news:Z1_If.182519$oG.163225@dukeread02...
We use an e-mail package called Groupwise;
What would one do in this case?
TIA,


"Adamaths" wrote
in
message ...

Hi,

I have a feeling it depends what e-mail system you are using, but as a
starting point try the following:

ActiveWorkbook.SendMail "Recipients name", "E-Mail subject"

Replace the Recipeints name and E-Mail subject with strings that meet
these criteria.

If thaat doesn't work can you let me know what E-Mail package you are
using - Outlook, Lotus Notes etc.. and I can have another look at it.

Regards,

Adam


--
Adamaths
------------------------------------------------------------------------
Adamaths's Profile:
http://www.excelforum.com/member.php...o&userid=31580
View this thread:

http://www.excelforum.com/showthread...hreadid=513097









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Macros to send email automatically

Sendmail is designed to use the default mail application as defined in the
registry. If you can do File=Send To = Mail Recipient, then it should
work.

--
Regards,
Tom Ogilvy


"Jim May" wrote in message
news:V7%If.182523$oG.162814@dukeread02...
Thanks Tom;
I'm (still) always afraid that when I try something like this
THE ENTIRE (Office) SYSTEM will go down and
within 2 or 3 minutes I'll be surrounded by several Firemen - and/or the
Hook and Ladder crew -- LOL
Oh well, what the heck,, I'll try it !!
Jim


"Tom Ogilvy" wrote in message
...
Try it.

--
Regards,
Tom Ogilvy

"Jim May" wrote in message
news:Z1_If.182519$oG.163225@dukeread02...
We use an e-mail package called Groupwise;
What would one do in this case?
TIA,


"Adamaths" wrote
in
message ...

Hi,

I have a feeling it depends what e-mail system you are using, but as

a
starting point try the following:

ActiveWorkbook.SendMail "Recipients name", "E-Mail subject"

Replace the Recipeints name and E-Mail subject with strings that meet
these criteria.

If thaat doesn't work can you let me know what E-Mail package you are
using - Outlook, Lotus Notes etc.. and I can have another look at it.

Regards,

Adam


--
Adamaths

------------------------------------------------------------------------
Adamaths's Profile:
http://www.excelforum.com/member.php...o&userid=31580
View this thread:

http://www.excelforum.com/showthread...hreadid=513097









  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macros to send email automatically


Thanks Adam,

It is working in my Outlook. However I am getting a pop-up saying "some
programs is trying to send email on behalf of you.... " with YES/NO
options while click yes to send out the email with the spreadsheet
attached...

Any ways to modify the text on the pop-up to make it more friendly?

Cheers, P



Adamaths Wrote:
Hi,

I have a feeling it depends what e-mail system you are using, but as a
starting point try the following:

ActiveWorkbook.SendMail "Recipients name", "E-Mail subject"

Replace the Recipeints name and E-Mail subject with strings that meet
these criteria.

If thaat doesn't work can you let me know what E-Mail package you are
using - Outlook, Lotus Notes etc.. and I can have another look at it.

Regards,

Adam



--
prague
------------------------------------------------------------------------
prague's Profile: http://www.excelforum.com/member.php...o&userid=30172
View this thread: http://www.excelforum.com/showthread...hreadid=513097

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macros to send email automatically


It should work with groupwise - I'm certain I've used the same code
before with Groupwise.

The only thing to be careful of is the way that users names are stored
in groupwise - for example if you put the recipient name as Mike Smith
groupwise may expect to see Smith, Mike.

I would suggest using an external e-mail address even if using
groupwise to send the mail internally.

Regards,

Adam


--
Adamaths
------------------------------------------------------------------------
Adamaths's Profile: http://www.excelforum.com/member.php...o&userid=31580
View this thread: http://www.excelforum.com/showthread...hreadid=513097

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Macros to send email automatically

Thanks I'll give it a try..
Jim

"Adamaths" wrote in
message ...

It should work with groupwise - I'm certain I've used the same code
before with Groupwise.

The only thing to be careful of is the way that users names are stored
in groupwise - for example if you put the recipient name as Mike Smith
groupwise may expect to see Smith, Mike.

I would suggest using an external e-mail address even if using
groupwise to send the mail internally.

Regards,

Adam


--
Adamaths
------------------------------------------------------------------------
Adamaths's Profile:
http://www.excelforum.com/member.php...o&userid=31580
View this thread: http://www.excelforum.com/showthread...hreadid=513097



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
Macro to send email automatically. Dan Wood Excel Discussion (Misc queries) 3 December 20th 09 12:19 PM
How do I send/email macros from my excel workbook to someone else? Drea Excel Worksheet Functions 1 August 10th 05 08:08 PM
How do I automatically send daily email of updated Excel workbook. How to automate emails with excel file. Excel Discussion (Misc queries) 1 May 9th 05 08:55 PM
automatically send email from excel charlie Excel Programming 2 September 11th 04 08:31 PM
VBA code to send range automatically via email Carl Excel Programming 1 June 29th 04 07:00 PM


All times are GMT +1. The time now is 06:54 AM.

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

About Us

"It's about Microsoft Excel"