ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macros to send email automatically (https://www.excelbanter.com/excel-programming/353474-macros-send-email-automatically.html)

prague[_3_]

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


Adamaths[_7_]

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


Jim May

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




Adamaths[_8_]

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


Tom Ogilvy

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






Jim May

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




Jim May

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








Tom Ogilvy

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










prague[_4_]

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


Jim May

Macros to send email automatically
 
I gave it a try (at work).
The macro paused along the way (a couple of times
asking for confirmation-type things) but it went-through,
without incident.
Thanks..



"Tom Ogilvy" wrote in message
...
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













All times are GMT +1. The time now is 11:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com