

December 5, 2016

We almost there
But what I need is each attachment file from the source folder goes to specific email recipient.
but the macro seems send all attachment from the folder to all recipient simultaneously, pls help to modify the attach
My meaning as follows :
Receiver | Should get ONLY |
ng.david.wl@semhk.sharp-world.com | RA_HN0B_1120.pdf as attachment ONLY |
chan.mary.me@semhk.sharp-world.com | RA_HN0F_1120.pdf as attachment ONLY |
chi.john.yk@semhk.sharp-world.com | RA_HN0M_1120.pdf attachment ONLY |
yeung.peter.wm@semhk.sharp-world.com | RA_HN0P_1120.pdf attachment ONLY |
ng.danniel.lo@semhk.sharp-world.com | RA_HN0T_1120.pdf attachment ONLY |


February 20, 2020

Hello,
new macro was made to send email through Outlook the macro will analyze each line of the sheet where the mailing lists are email will be sent to each recipient on each line only files that are on the corresponding line will be attached to the recipient of each line if you want to add more than one attachment to the same email, you just have to follow the example I left it ... that is, you have to write as follows in column ("D"), in the recipient's row: file1 path#file2 path#file3 path C:\Users\...\image1.jpg#C:\Users\...notepad.txt#C:\Users\...\pdf file.pdf if it's just an email it's just: C:\Users\...\pdf file.pdf
in short, each line is an email with its attachments
Miguel,


December 5, 2016

Thanks again Miguel
I try the macro with live data but found that attached has been attached twice for each mail send, [ pls refer attached screen shot] can you help again to rectify the script.
Also is it possible to add the "To Email recipient" from one to five "CC Email recipient from one to five'" ;"BCC Email recipient from one to five'"


February 20, 2020

Hello,
sorry, my mistake
change in module1 where the following part is, replace the line with this one in red
If x > 0 Then
For a = LBound(ArrInput) To UBound(ArrInput) - 1
ArrOutput = Split((ArrInput(a)), "#")
On Error Resume Next
checkD = ArrOutput(0)
On Error GoTo 0
If checkD <> "" Then
If FileExist(checkD) = False Then GoTo nextX:
outlEmail.Attachments.Add checkD
End If
nextX:
attached corrected file
Miguel,


February 20, 2020

Hello,
update complete, file attached
you just need to do the following when you go to write the email addresses, whether in column ("A") send to, or in column ("B") send CC, or in column ("C") send BCC, insert a semicolon ";" between each email address example in range ("A2"): firstEmail@email.com;secondEmail@email.com;thirdEmail@email.com
for ranges in columns ("B") and ("C") it is the same situation
Miguel,


February 20, 2020

Hello everyone,
I attached a file with changes as requested
on the sheet I added a new command button to update the list of email addresses to (send to & send CC)
with all the lists you had on the demo sheet, the demo sheet is in this file too
there are two command buttons, one to update the list and the other to send, you can adapt to your needs
Miguel,


February 20, 2020

Hello everyone,
the file I attached works perfectly, I just downloaded it on 2 different computers (32-Bit & 64-Bit), and I did the tests
review everything you are doing wrong
_ the first time you open an excel file (either because it is new or because the name has been changed), excel disables editing and macros, if you ignore these alerts, nothing will work
_ you must allow editing
_ you have to allow macros
_ in some situations (such as company computers), there may be additional security protocols, in which if the excel file was not created on that computer, the macros will always be in "disable" mode, "enable" mode not being allowed . To get around these protocols, you need to click on "save as", with a new name, close the excel file, and open the newly created one, allow editing and macros, and everything works



attached images, illustrative
(compressed) test video in file
Miguel,


December 5, 2016

Hi Miguel, thanks the hints again.
So after adjust the Macro security level by the IT Administrator to my PC, now the Macro works with Ms.Office 2019 [Prof Version] wiht os Windows 10, but I did try an old office version, error crop-up prompting some Library files is missing, please help whcih library files must activate to enable Macro of this kind.


December 5, 2016

In the Email Macro how to modify and include attachment File name in the Email Subject :
(1) Monthly Report & 12349
attachment file is : 12349.xls
(2) Monthly Report & 456789
attachment file is : 456789.xls
(3) Monthly Report & 987654
attachment file is : 987654.xls
etc etc
1 Guest(s)
