I dont think you can do that.
If you want to send an email without Outlook being opened, you will need to use the SMTP object or the CDO object.
I dont think you can do that.
If you want to send an email without Outlook being opened, you will need to use the SMTP object or the CDO object.
Hello jason_lee_91,
Thank you for guidance. Please tell me which is the best option to send mail from excel without opening outlook automatically. Is there anything wrong in code? Tell me the setting to achieve the target.
Waiting for your guidance.
Thanking you in anticipation.
Mukesh
One thing I myself might do differently is instead of using On Error GoTo lblLoop, I would probably find out why it throws an error and use an if statement.
Its just that currently, any errors caused by that formula would stop the email from being sent.
there could be many things that trigger an error.
It could just be that the input was in the wrong format.
If thats the case, maybe the emails will never get sent and you might not know that there is actually a problem in your code.
But thats entirely just my opinion/preference.
Also, I have heard that people feel that GoTo statements are slightly harder to read in many cases.
Hello jason_lee_91,
As per your suggestion it's not a safer way. At present only I have to open the outlook before opening excel file to send the message. It's better than inserting password in code. I think that I shall continue the present code and system to open outlook first then excel.
Give me your opinion on it so that I will close this thread.
Thank you.
Mukesh
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks