Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using VBA to send email based on form response

Hi,

I have a user form that basically allows a user to select a class the
want to attend. This form then updates another sheet with the user'
name, the class they have selected and records the time they signed u
for the class.

Currently I just have a msg box popping up to say that they have bee
registered for the class. However, they (the powers that be) woul
also like an email confirmation to be sent out.

Users will be accessing the file over a general file server -

Basically the user would be sending a message to themself verifyin
that they've signed up for the class since they'll open the file o
their box and will not have permission to access another emai
account-

Here are the questions -

Can excel trigger an email through outlook that states the user nam
and the date of the class they selected?

Excel would have to use the user name they select from the drop dow
box in the form as the recipient in the to: line. Outlook would the
have to get the email address based on that name. Normally outlook ca
reconcile the email address if only the name is entered.

Any help is greatly appreciated.

If you need any other information please let me know.

Thanks,

Jef

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using VBA to send email based on form response



--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default Using VBA to send email based on form response

Hi Jeff,

Excel can send e-mail (an account needs to be active on the box). I'm
not going to post the code here, look on the net/newsgroups/macro
recored.

I would make the follow suggestions.
I would ask the user to enter an e-mail, and then use this. It would
make the code a whole lot easier, and i think it is a better way to go
anyway, as the user can control which e-mail account is to be used.
If you use the out look address book, you'll have to code to get the
address based on the name, and say there are 2 folks with the same
name, the user may need to look it up etc, he may need to do this
anyway.

If i was you i'd ask them for there e-mail address and be done with
it, sometimes it's just better to keep things simple!

anyway
good luck
Ross
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using VBA to send email based on form response

Thanks for your help Ross. You're right, I should have the user ente
an email address.

If they do not enter the email address then an email will not be sent?

Is there any way that you can post the code here. I'm accessing thi
through a portal (http://www.excelforum.com) and not through
newsgroup,

Thanks,

Jef

--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default Using VBA to send email based on form response

Jeff, if you can get here your laughing,

http://www.rondebruin.nl/sendmail.htm

(Thanks to Ron de Bruin)

If they do not enter the email address then an email will not be sent?


You could use application.username, or windows.username or somthing to
get a user name, and then try and get the users e-mail adress from the
outlook address book, but this will need alot(well more) of codeing,
and you'll have to access outlook from excel (i'm not mega sure but i
think maybe outlook uses vb sripit?) anyway. On top of all this there
is no guarantee that the system and excel user name will be a match
for the e-mail address (unless you know this is not the case for your
network). For example, my username on the pc is 7537462 (or whatever),
and my excel "user name" is BT, so that wouldn't be any good.

You could ask them there name, (say in a text box, or your drop down
box) and use this to get the e-mail addres from outlook, but agian, if
john smith works at you place you could be introuble!

I think you have to get it from another box - i dont think it will be
an inconvenience for your users.

Good Luck
Ross
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
send email to each customer email in excel sheet. -keevill- Excel Discussion (Misc queries) 3 July 17th 08 02:33 PM
can I get excel to send an email based on a cell result? rasty Excel Discussion (Misc queries) 1 June 7th 07 09:27 AM
send wkbk as an email attachment with an email address copied from SueInAtl Excel Discussion (Misc queries) 0 May 21st 07 10:53 PM
Form to send by Email Cloudburst99 Excel Discussion (Misc queries) 0 April 21st 05 03:00 PM
cmd button, send form via email andy[_5_] Excel Programming 1 March 6th 04 07:26 AM


All times are GMT +1. The time now is 03:25 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"