[AccessD] Attaching a file to an email

S D accessd667 at yahoo.com
Thu May 27 00:37:38 CDT 2004


Correct! My mistake, forgot to mention that.
 
Sander

Charlotte Foust <cfoust at infostatsystems.com> wrote:
I believe you have to have CDO installed to make that work, do you not?
Since CDO isn't installed automatically, even with Outlook, that could
be problematic.

Charlotte Foust

-----Original Message-----
From: S D [mailto:accessd667 at yahoo.com] 
Sent: Tuesday, May 25, 2004 1:23 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Attaching a file to an email


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 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
-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.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


More information about the AccessD mailing list