By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,491 Members | 1,868 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,491 IT Pros & Developers. It's quick & easy.

E-mail word document as an attachment from Access

P: n/a
Good day all, I am very new to access and not a programmer! Is it
possible to send a word document as an attachment from access. If yes
could you please tell me how.

thanks in advance for any help.

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
Mar 6 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
First set a reference to outlook in your code window. Select Tools ->
References and scroll down - it's there.

I use this code.

Public Function SendEmail(ByRef sTo As String, ByRef sCC As String, _
ByRef sBCC As String, ByRef sSubject As String, _
ByRef sBody As String, sAttachedFilePath) As
String

Dim olApp As Outlook.Application
Dim olMail As Outlook.MailItem
Dim sError As String
Dim iFileCount As Integer
Dim iCntr As Integer
Dim sFile As String
Dim sFileName As String

Set olApp = CreateObject("Outlook.Application")
Set olMail = olApp.CreateItem(olMailItem)

With olMail

.To = sTo
.CC = sCC
.BCC = sBCC
.Subject = sSubject
.Body = sBody
.Attachments.Add (sAttachedFilePath)
.Send

End With

End Function
"Les Stout" <an*******@devdex.com> wrote in message
news:EL*************@news.uswest.net...
Good day all, I am very new to access and not a programmer! Is it
possible to send a word document as an attachment from access. If yes
could you please tell me how.

thanks in advance for any help.

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***

Mar 6 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.