Email a document

C

ChrisUK

Hi.

I'm using SendMail to add the contents of the current active document
to an email body as an attachment and then send it.

Problem I have is I can add the attachment but I can't specify a
subject line or send address's.

Here is what I'm doing:

ActiveDocument.SendMail

How can I add a subject line, to address's and then send it ?

Help please.

TIA

Chris
 
H

Helmut Weber

Hi Chris,
don't know whether what you want is possible with
"sendmail". You may try this instead. Make sure,
you have set a reference to the outlook library.
---
Dim oOut As Outlook.Application
Set oOut = New Outlook.Application
Dim oOutMail As Outlook.MailItem
Set oOutMail = oOut.CreateItem(olMailItem)
With oOutMail
.To = ' Address
.Attachments.Add ActiveDocument.FullName
.cc = 'whoever
.Subject = 'whatever
.Body = 'Whatever
.Display
' if using ".send" the Mail will be sent immediately.
End With
Set objOutlook = Nothing
Set objmail = Nothing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top