Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatically

Status
Not open for further replies.

cassie99

Programmer
Dec 20, 2001
26
0
0
US
Hello.

I have a command button on a MS Word form. I would like to open a MS Outlook window with the MS Word form as an attachment. That's easy enough...

Private Sub cmdSendOfficeReq_Click()
Options.SendMailAttach = True
ActiveDocument.SendMail
End Sub

The question is how can I programatically:
1) fill in the To: box with my destination email address
2) fill in the Cc: box with an email address
3) fill in the subject line
4) automatically send the email

Thanks in advance.

Cassie


 
Hi there, I have no idea if this will even come close to helping you but I thought I would try. This is code I have in Access that opens outlook and addresses attaches a word doc to an email. Maybe you will find a helpful clue in here.

Good luck!!

Dawn

Dim objapp As Outlook.Application
Set objapp = New Outlook.Application

Dim objemail As Outlook.MailItem
Set objemail = objapp.CreateItem(olMailItem)

'attaches letter to email object with current record email address and subject
objemail.Attachments.Add Application.CurrentProject.Path & "LetterToAdoptiveFamily.doc", , , "Adoption Information.doc"
objemail.To = Me!
objemail.Subject = "Prospective Adoptive Family Information"
objemail.Display

[URL unfurl="true"]www.calliopeconsulting.net[/URL]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top