I hope that it help You resolve your problem:
Sub POCZTA0()
Dim myattachment
Dim olNs As Object
Dim olMailItem
Dim olMail As Object
Dim olApp As Object
Dim ATTACH1 As String
ATTACH1 = Application.GetOpenFilename("Text Files (*.*), *.*")
Set olApp = CreateObject("Outlook.Application")
Set olNs = olApp.GetNamespace("MAPI")
olNs.Logon
Set olMail = olApp.CreateItem(olMailItem)
olMail.Display
olMail.To = "
[email protected]"
olMail.CC = "
[email protected];" & "
[email protected];" & "
[email protected];"
'olMail.BCC =
olMail.Subject = "Your subject"
olMail.Body = vbCr & vbCr & "Your body text" & vbCr & vbCr
Set myattachment = olMail.Attachments
myattachment.Add ATTACH1
olMail.Send
olNs.Logoff
Set olNs = Nothing
Set olMail = Nothing
Set olApp = Nothing
End Sub
BR/
Kazik