thanks for reply, but I need something else.
Attachment isnt clue, code should send 3 mails, but it send only 1.
My code is correct with sending emails - I mean:
In folder I have 3 files:
- 11111.pdf
- 22222.pdf
- 33333.pdf
If loop find file 11111.pdf - email should be send to Receiver A (email1@email.com).
If loop find file 22222.pdf - email should be send to Receiver B (email2@email.com)
if loop find file 33333.pdf - email should be send to Receiver C (email3@email.com).
But code doesnt works good. Despite I have 3 correct named files in folder - code find obiously 3 different files in pdf, but it send only one email - to receiver C, but it should send 3 different mails to 3 different email addresses.
It's running only this part of code properly:
But in folder there is two other good files, and they should be also send to other receivers.PHP Code:
ElseIf InStr(1, xFname$, "33333", vbTextCompare) > 0 Then
Temat = "Company 3333"
Tresc = "ple ple 3"
MsgBox ("Send to company 33333")
Bookmarks