[AccessD] SendObject Attachments

max.wanadoo at gmail.com max.wanadoo at gmail.com
Fri Nov 23 11:51:28 CST 2007


Would you like a CDO example?

Max
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin at
Beach Access Software
Sent: Friday, November 23, 2007 5:33 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] SendObject Attachments

Max:

That'll work as long as Outlook is loaded on the target machine.  Which I
know it isn't.  Because I had similar code in the current app but had to
disable it because of that very problem.  However,  now the client says
assume Outlook.  So that's what I'll do.  

Your code will work just fine.  Thanks.

Rocky





 	
	

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
max.wanadoo at gmail.com
Sent: Friday, November 23, 2007 9:26 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] SendObject Attachments

Hi Rocky,
Try this:


  Dim myolApp As Outlook.Application, myItem As Outlook.MailItem
  Dim strDataFileName As String, strEmailTo As String
  Set myolApp = CreateObject("Outlook.Application")
  Set myItem = myolApp.CreateItem(olMailItem)

  strEmailTo = "Rocky at databaseadvisors.com"
  strDataFileName = "c:\filename.txt"
  myItem.HTMLBody =
fFileContents("c:\Templates\General\ExplainSecureMailings.html")
  myItem.To = strEmailTo
  myItem.Subject = "Data Mailings"
  myItem.Attachments.Add strDataFileName
  myItem.Attachments.Add "c:\file2.txt"
  myItem.Attachments.Add "c:\file3.txt"  
  myItem.Attachments.Add "c:\file4.txt"
  myItem.Send

Max 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin at
Beach Access Software
Sent: Friday, November 23, 2007 4:20 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] SendObject Attachments


 
Dear List:
 
Can you use SendObject to generate an email with two attachments?  If not,
in the absence of being assured that outlook is on every machine (which it
ain't in this case), is there some other simple global method to generate an
email with a couple of attachments?
 
MTIA
 
Rocky
 

 
--
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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.16.4/1146 - Release Date: 11/22/2007
6:55 PM
 

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list