View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
ross ross is offline
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