email the current document

R

raj

I am trying to attach the current document to a new email for a particular client(always 1 email address only) using

ActiveDocument.SendMai

the file is successfuly getting attached to the new mail, but i am not able to set the address and subject line through my macro

how can i do this. please help
 
H

Helmut Weber

Hi Raj, just one of several ways
Sub MyMail()
' Extras References Check Outlook-Library
Dim Otl As Outlook.Application
Set Otl = New Outlook.Application
Dim OtlItem As MailItem
With Otl
Set OtlItem = .CreateItem(olmailitem)
With OtlItem
.To = "(e-mail address removed)"
.Subject = "Hi and higher"
.attachments.Add ActiveDocument.FullName
.Display ' for testing
' .Send ' send
End With
End With
end sub
To avoid complications, the document has to be saved beforehand.
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
 

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