, 02 2014 . 13:20
+
Access 2007
, .
, "" ( )
( )
?
""
.
:
Public Function mail()
Dim olApp As Outlook.Application
Dim outMail As Outlook.MailItem
Dim inNameSpace As Outlook.NameSpace
Dim InFolder As Outlook.MAPIFolder
Dim strS As String, strB As String
'
Dim path
Dim fil
Dim filp
path = "C:\SedMO\TEMP\OutPut\files\"
fil = Dir(path)
filp = path & fil
'
Set olApp = New Outlook.Application
Set inNameSpace = olApp.GetNamespace("MAPI")
Set InFolder = inNameSpace.GetDefaultFolder(olFolderInbox)
strS = Forms!frm_mail!resipient_mail
If strS <> "" Then GoSub Add_Mail
Exit Function
Add_Mail:
Set outMail = olApp.CreateItem(olMailItem)
With outMail
.Subject = Forms!frm_mail!topic
.Body = Forms!frm_mail!content
.Recipients.Add strS
If fil = "" Then GoTo f
.Attachments.Add filp = filp
f:
.Send
End With
Return
End Function
http://www.sql.ru/forum/1092455/otpravka-attachments-s-otnositelno-neogranichennym-kolichestvom-faylov