Mailing a document through Outlook

M

Michele60

I have created a form template in Word 2003, and now want to have the staff
that will be utilizing this form be able to open a new message in Outlook,
attach the form, have the email addressed to the recipient, have the subject
line completed, and the form emailed in one click. I have searched through
past threads here and have found what I needed on a web site:
http://www.word.mvps.org/FAQs/InterDev/SendMail.htm.

Unfortunately, when I enter this code in (specifically Dim oOutlookApp As
Outlook.Application and Dim oItem As Outlook.MailItem), I am receiving a
Compile Error that the User-defined type is not defined. I've looked in all
the reference books I have, and this looks correct. And it appears I'm
writing the code correctly - or am I? (with the font used, it's difficult to
tell capital i's from l's and such) I've always received terrific help and
advice here before. Can some one tell a novice VB (very novice) person what
she's doing wrong?

Thanks!

Michele
 
D

Doug Robbins - Word MVP

You have not set the required reference to the Microsoft Outlook Object
Library via Tools>References in the Visual Basic Editor.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
M

Michele60

Thank you so MUCH! I never would have found this or thought of this, but once
I was able to locate and set the required reference, the code is working
beautifully!

Thank you, again!

This place is awesome!

Michele
 

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