PDA

View Full Version : Send Outlook Mail With Signature, Range From Excel and Multiple Email IDs



Excel Fox
02-20-2012, 01:47 AM
This is an extension of an earlier post here (http://www.excelfox.com/forum/f2/excel-template-macro-sending-mails-attahment-thru-outlook-142/) in the forum where we talk about sending mails with attachments and also copying a defined range from the excel spreadsheet on to Outlook.

The piece here is an upgrade to the one above.

I have added the option to use signature in the mail, and also allowed flexibility to use more than one email id in the To, or CC or BCC section.

bandus
12-01-2013, 09:37 PM
Dear Excel Fox,
Thanks for this awesome solution. However I cannot skip displaying my message, why is this happening?

Ichanged the
blnShowEmailBodyWithoutSending variable to False and also deleted a .Display command from the Else section but it still pops up the window woth the message? How could I turn off this function?

Thanks again in advance!

Excel Fox
12-01-2013, 09:44 PM
Are you saying it is not sending the mail, but only displaying the message, or are you saying that it is showing the security suspicious activity message for accessing Outlook?

bandus
12-01-2013, 10:17 PM
In the previous version of this email-sender when I changed the "blnShowEmailBodyWithoutSending" variable there were two options: the macro sent the messages "automatically" or displayed the message and I had to click on the send button.

Now either this variable is true or false the macro always pops up the message window and I have to send it manually in both cases. The code is the following:




'Should we display the message before sending?
If blnShowEmailBodyWithoutSending Then
.Display
Else
.Display
.Save
.Send
End If


So I thought the solution is changing the "blnShowEmailBodyWithoutSending" to False and delete the .Display command from the Else section, but it still shows the email before sending and I still have to click on send to send it. Do you have any idea why is this happening?

https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
https://eileenslounge.com/viewtopic.php?p=316254#p316254 (https://eileenslounge.com/viewtopic.php?p=316254#p316254)
https://eileenslounge.com/viewtopic.php?p=316280#p316280 (https://eileenslounge.com/viewtopic.php?p=316280#p316280)
https://eileenslounge.com/viewtopic.php?p=315915#p315915 (https://eileenslounge.com/viewtopic.php?p=315915#p315915)
https://eileenslounge.com/viewtopic.php?p=315512#p315512 (https://eileenslounge.com/viewtopic.php?p=315512#p315512)
https://eileenslounge.com/viewtopic.php?p=315744#p315744 (https://eileenslounge.com/viewtopic.php?p=315744#p315744)
https://www.eileenslounge.com/viewtopic.php?p=315512#p315512 (https://www.eileenslounge.com/viewtopic.php?p=315512#p315512)
https://eileenslounge.com/viewtopic.php?p=315680#p315680 (https://eileenslounge.com/viewtopic.php?p=315680#p315680)
https://eileenslounge.com/viewtopic.php?p=315743#p315743 (https://eileenslounge.com/viewtopic.php?p=315743#p315743)
https://www.eileenslounge.com/viewtopic.php?p=315326#p315326 (https://www.eileenslounge.com/viewtopic.php?p=315326#p315326)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40752 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40752)
https://eileenslounge.com/viewtopic.php?p=314950#p314950 (https://eileenslounge.com/viewtopic.php?p=314950#p314950)
https://www.eileenslounge.com/viewtopic.php?p=314940#p314940 (https://www.eileenslounge.com/viewtopic.php?p=314940#p314940)
https://www.eileenslounge.com/viewtopic.php?p=314926#p314926 (https://www.eileenslounge.com/viewtopic.php?p=314926#p314926)
https://www.eileenslounge.com/viewtopic.php?p=314920#p314920 (https://www.eileenslounge.com/viewtopic.php?p=314920#p314920)
https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=314837#p314837 (https://www.eileenslounge.com/viewtopic.php?f=30&t=40533&p=314837#p314837)
https://www.eileenslounge.com/viewtopic.php?f=21&t=40701&p=314836#p314836 (https://www.eileenslounge.com/viewtopic.php?f=21&t=40701&p=314836#p314836)
https://www.eileenslounge.com/viewtopic.php?f=27&t=40621&p=314621#p314621 (https://www.eileenslounge.com/viewtopic.php?f=27&t=40621&p=314621#p314621)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)

Excel Fox
12-01-2013, 10:42 PM
Not sure why I kept the line like that, but it should be



'Should we display the message before sending?
If blnShowEmailBodyWithoutSending Then
.Display
Else
.Save
.Send
End If


And blnShowEmailBodyWithoutSending should be FALSE

bandus
12-01-2013, 10:49 PM
Not sure why I kept the line like that, but it should be

...

And blnShowEmailBodyWithoutSending should be FALSE

Yes, this is exactly what I thought as a solution, but it still shows the message and I have to click on send manually. So in theory it should be working but unfortunately it is not. If you do these modification in your computer does it work? Just to know if something wrong with my system because the code semms completely correct for me.

Thanks for investigating the problem!





https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)

bandus
12-01-2013, 11:24 PM
I came up with a not so sophisticated solution:
defined the variable as a boolean but not optional, and then gave the False value for it.

Excel Fox
12-02-2013, 05:33 AM
If that's working, then there has to be something easily correctable. I will look at it and post an update.

bandus
01-16-2014, 01:40 PM
Hi Excel Fox,

Another question came up for me: is it possible to somehow add pretty and formatted text to the body of a message using this macro or should I search for the solution somewhere else? :)

Thank you in advance!

bandus

YESMUN
05-03-2016, 04:00 PM
Hi Excel Fox

Thank you for a brilliant script, it is awesome.

I am having an issue with the signature thought, I have images in my signature and it is not inserting them they are just showing up as image boxes with the image unavailable.

I am using Outlook 2013.

jackspero222
10-22-2019, 02:45 PM
wow I have just found what I was looking for , 1 few alteration I need I just want to paste 4cells as range in body of email for e.g current I9 range we are pasting I want to paste i9:m9 .

Kundanlal
12-07-2019, 11:17 PM
Hi..

Thanks for the codes.. If we try to add 2nd attachment and send, it gives error "Bad file Name or number"..

I am using Outlook 2013..

Can you please check this..

Excel Fox
12-10-2019, 09:56 PM
Shared a new thread at http://www.excelfox.com/forum/showthread.php/2388-Send-Outlook-Mail-With-Multiple-Attachments-To-Multiple-Email-IDs