S D
accessd667 at yahoo.com
Tue May 25 04:23:21 CDT 2004
Don't know if this was solved or not but this does the trick.
Here's part of my VB code wich attaches a file to an e-mail. It makes use of the MAPISESSION component :
frmMain.MAPISession1.UserName = ProfileName
frmMain.MAPISession1.NewSession = True
frmMain.MAPISession1.SignOn
With frmMain.MAPIMessages1
.SessionID = frmMain.MAPISession1.SessionID
.Compose
.MsgIndex = -1
.RecipAddress = Recip
.ResolveName
.MsgSubject = strMail_Titel
.MsgNoteText = NoteText
If Bestand <> "" Then
.AttachmentIndex = .AttachmentCount
.AttachmentPathName = Bestand
.AttachmentType = mapData
.AttachmentPosition = Len(.MsgNoteText) - 1
.AttachmentName = Bestand
End If
.Send
End With
frmMain.MAPISession1.SignOff
frmMain.MAPIMessages1.SessionID = -1
SendMailOrder = True
LogStatus "Mail verstuurd (" & strMail_Titel & ")"
Rocky Smolin - Beach Access Software <bchacc at san.rr.com> wrote:Dear List:
I would like to export a couple of text files from an app and hook them to an email, though code. I'm using DoCmd.SendObject because it looks like it's independent of the mail client onthe user's machine.
But is there a way to attach a file to the email which is generated by DoCmd.SendObject?
MTIA
Rocky Smolin
Beach Access Software
http://www.e-z-mrp.com
--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
---------------------------------
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger