Hello Daniel and Richard,
Already I'm managed with problem 
Code works, I need add "call" instruction to each section "IF":
PHP Code:
If InStr(1, xFname, "11111", vbTextCompare) > 0 Then
Adresmailowy = "firma1@firma.com"
Temat = "Firma 1111"
Tresc = "ple ple 1"
MsgBox ("WYSYŁAM DO Firmy 11111")
Call Mail2(Adresmailowy, Temat, Tresc, xFname, xDirect)
ElseIf InStr(1, xFname, "22222", vbTextCompare) > 0 Then
Adresmailowy = "firma2@firma.com"
Temat = "Firma 2222"
Tresc = "ple ple 2"
MsgBox ("Wysyłam do Firmy 22222")
Call Mail2(Adresmailowy, Temat, Tresc, xFname, xDirect)
ElseIf InStr(1, xFname, "33333", vbTextCompare) > 0 Then
Adresmailowy = "firma3@firma.com"
Temat = "Firma 3333"
Tresc = "ple ple 3"
MsgBox ("Wysyłam do Firmy 33333")
Call Mail2(Adresmailowy, Temat, Tresc, xFname, xDirect)
And I added outmail function in other section:
And it works properly. It sends 3 mails if code found files named: "1111", "2222", "3333". 
Thanks guys!
Bookmarks