Re: Attaching a CSV file to an Outlook Express Email from Access
- From: David <David@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 23 Aug 2006 14:02:01 -0700
Thanks, John, for that info. Just one question - will this work in Access
2003 under XP; I should have said that in my original question that I have XP
and not 2000.
Thanks again,
dave
--
Dave
PHONE SOURCE
www.thephonesource.com
"John Nurick" wrote:
This should get you started. It uses the Microsoft CDO Library for.
Windows 2000.
Sub SendMailCDO(ToWhom As String, FromWhom As String, _
Subject As String, Body As String, _
Optional AttachmentPath As String = "")
Const cdoDefaults = -1
Const cdoIIS = 1
Const cdoOutlookExpress = 2
Dim Message As Object 'CDO.Message
Set Message = CreateObject("CDO.Message")
With Message
'Use default configuration from system
'until I learn otherwise
.Configuration.Load -1
.To = ToWhom
If Len(FromWhom) > 0 Then
.From = FromWhom
End If
.Subject = Subject
.TextBody = Body
If Len(AttachmentPath) > 0 Then
.AddAttachment AttachmentPath
End If
.Send
End With
End Sub
On Wed, 23 Aug 2006 08:28:01 -0700, David
<David@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi - I've been transmitting orders to a supplier by using SendObject with a
string of text that contains the order info. Now, the supplier would like an
attached comma-delimited file instead. But SendObject doesn't seem to allow
me to send a table comma delimited. I can use TransferText to make an ASCII
comma-delimited text file, but then I would have to attach it manually to the
email. Is there a way to preserve my one-button order process and send the
data comma-delimited?
Thanks
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.
- Follow-Ups:
- Re: Attaching a CSV file to an Outlook Express Email from Access
- From: John Nurick
- Re: Attaching a CSV file to an Outlook Express Email from Access
- References:
- Re: Attaching a CSV file to an Outlook Express Email from Access
- From: John Nurick
- Re: Attaching a CSV file to an Outlook Express Email from Access
- Prev by Date: Re: linking databases
- Next by Date: RE: Export to Excel & write back to Access
- Previous by thread: Re: Attaching a CSV file to an Outlook Express Email from Access
- Next by thread: Re: Attaching a CSV file to an Outlook Express Email from Access
- Index(es):