Send closed doc as an email attachment

L

Lesley Regan

This excellent link to http://word.mvps.org/FAQs/InterDev/SendMail.ht
assumes it's the active document I want to send

What if I want to define a path to a closed document and send that one as an attachment instead

I have a routine that always saves to a specific document name in My Documents. I want to open up a new email message and send that specific document

I tried customizing Help text from VBA Help in Outlook, but nothing seemingly happened

Set myOlApp = CreateObject("Outlook.Application"
Set myItem = myOlApp.CreateItem(olMailItem
Set myAttachments = myItem.Attachment
myAttachments.Add "C:\My Documents\Q496.xls",
olByValue, 1, "4th Quarter 1996 Results Chart

Any insights? I'd appreciate some direction

Regards

Lesle
 
P

Peter Hewett

Hi Lesley Regan

Does your code include a myItem.Send statement at the end to actually send the email?

HTH + Cheers - Peter
 
L

Lesley Regan

Hello, Peter

Actually, it did have code of that kind at the end. I ended up with this work-around instead

Documents.Open FileName:="drive:\docname.doc" (insert correct path between quotes
ActiveDocument.SendMai

I didn't need it to run from Outlook, Word was fine as long as I didn't have too many clicks for my discerning users

Thanks for the suggestion and

Cheers from Lesley
 

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