PDA

View Full Version : Solved: Document, once finished e-mailed to a specific address



ctengelen
03-13-2006, 02:03 PM
:hi: Hi All,

In the Office Integrated system is there a way to have a button on a WORD document that e-mails the documents as an attachment to a specific e-mail address??

Thanks once again for all your help.

Trudy

lucas
03-13-2006, 09:11 PM
Try Steiners email code. Works whether you have outlook or not:
http://vbaexpress.com/kb/getarticle.php?kb_id=310

lucas
03-13-2006, 09:44 PM
Here's another one that uses outlook:
http://vbaexpress.com/kb/getarticle.php?kb_id=98

ctengelen
03-14-2006, 09:02 AM
Hi Steve,

Thanks for the help - as usually you guys are there and you are terrific.
The shorter macro - id98 will not work for me properly.

It stops at *Set EmailItem = OL.CreateItem(olMailItem)*, highlights the (olMailItem) and gives me an Compile Error.

I would like to use this macro as it gives the user a chance to write notes with the send document.

The longer code id310 works good.

ctengelen
03-14-2006, 09:04 AM
Just need to tell you folks how much you helped me. It is so good to be able to turn to someone to ask questions.

It is like a "leg up" and I am on my way again, happily writing code until the horse stops dead and I need help.

Thanks for all your great help.

Trudy

ctengelen
03-14-2006, 12:52 PM
Hi me again,

On the short code (that did not want to work for me = id98) I took out the "Option Explicit" and it now works okay. Just that I can not add any text to the e-mail. It just sends it the way it is.

Is there any way that we could add notes to the e-mail before it leaves the home??

Once again, thanks for your help.

Trudy

lucas
03-14-2006, 01:40 PM
Your problem (Option Explicit) could be a missing reference. Go to tools in the vbe and click on references to see if any are missing.

If I understand the other part of your question, you want outlook to pop up before its sent to the out box. This is all I have and it does't(so far)add the email address....maybe someone will come along and have a solution....


Sub EmailDocAsAttachment()
'Display activedocument as attachment in Email item to send it
With Application
.Options.SendMailAttach = True
.ActiveDocument.SendMail
End With
End Sub

mdmackillop
03-14-2006, 01:50 PM
If you insert .display instead of .send into the 98 code, you will see the email ready for sending.

lucas
03-14-2006, 01:59 PM
Yes it does, thank you very much Malcolm

ctengelen
03-15-2006, 02:27 PM
:beerchug:
Thank you!!!!!

:friends:

You are the the Greatest!!!!!!!

:bow:

I am in Awe.

It WORKS - IT WORKS - It Works

Trudy

ctengelen
03-16-2006, 08:29 AM
Hello folks,

Now I am in real touble....:dunnoI want to set my thread as solved and for the world of me, I can't find the link on how to do this. I done it before and now???? Am I blind or can I just not see it???:bug:

You have been such great help and I want to make sure I stay within your guidelines and mark my thread as solved.

Thanks again.
Trudy from Snowy Alberta, Canada

lucas
03-16-2006, 08:40 AM
Hi Trudy,
No reason to panic. The forum is going through an upgrade and this has been a lingering problem. I will Try to mark it solved for you.