I do that in my application but it gets complex the way I do it because I
use an email template and an smtp component to send the emails.
I basically extract the file(s) from the attachment field and save them to a
directory called "Attachments999" and save the path in an array.
I expect 9 or less attachments in the attachments field.
Then you can just use a little bit of code to build an Outlook email. That
should be easy to find examples for.
HTH,
Mark
The code to retrieve the files from the attachment field is:
'Open recordset of attachments, save each one to disk and assign to
attachments() array
For iii = 1 To 9
Attachments(iii) = ""
Next iii
filepath = CurrentDBDir() & "Attachments999\"
If Len(Dir(filepath, vbDirectory)) = 0 Then
MkDir filepath
End If
iii = 1
Set RSAttachments = RS.Fields("Attachments").Value
While Not RSAttachments.EOF
If (FileExists(filepath &
RSAttachments.Fields("FileName").Value)) Then
Kill filepath & RSAttachments.Fields("FileName").Value
End If
RSAttachments.Fields("FileData").SaveToFile filepath
Attachments(iii) = filepath &
RSAttachments.Fields("FileName").Value
iii = iii + 1
RSAttachments.MoveNext
Wend
RSAttachments.Close
Function CurrentDBDir() As String
Dim strDB As String, strCurrentDir As String
strDB = CurrentDb.Name
strCurrentDir = Left(strDB, Len(strDB) - Len(Dir(strDB)))
CurrentDBDir = strCurrentDir
End Function