![]() |
Send mail from Excel
Hi,
I'm writing some codes that allow users to send e-mail from Excel using CDO object. To make it work, I need to provide the name of the SMTP server and I don't want to hard code it in the program. I wonder is that any functions that can get the SMTP server name in VBA so that I can incorporate it in my codes? Your help is much appreciated! Regards, Steve C. |
Send mail from Excel
Don't know the answer, but you could create an environment variable and read
that in the program. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Steve C." wrote in message ... Hi, I'm writing some codes that allow users to send e-mail from Excel using CDO object. To make it work, I need to provide the name of the SMTP server and I don't want to hard code it in the program. I wonder is that any functions that can get the SMTP server name in VBA so that I can incorporate it in my codes? Your help is much appreciated! Regards, Steve C. |
Send mail from Excel
Hi Steve
Never have look for something like this but look at this page http://vbnet.mvps.org/ If you have setup a mail account in OE then CDO use the SMTP server from OE More info about CDO you can find here http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Steve C." wrote in message ... Hi, I'm writing some codes that allow users to send e-mail from Excel using CDO object. To make it work, I need to provide the name of the SMTP server and I don't want to hard code it in the program. I wonder is that any functions that can get the SMTP server name in VBA so that I can incorporate it in my codes? Your help is much appreciated! Regards, Steve C. |
Send mail from Excel
Hi Ron and Bob, thanks for your help!
-----Original Message----- Hi Steve Never have look for something like this but look at this page http://vbnet.mvps.org/ If you have setup a mail account in OE then CDO use the SMTP server from OE More info about CDO you can find here http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Steve C." wrote in message ... Hi, I'm writing some codes that allow users to send e-mail from Excel using CDO object. To make it work, I need to provide the name of the SMTP server and I don't want to hard code it in the program. I wonder is that any functions that can get the SMTP server name in VBA so that I can incorporate it in my codes? Your help is much appreciated! Regards, Steve C. . |
All times are GMT +1. The time now is 12:34 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com