Sending email from Access

B

Bill D.

I have learned a ton of stuff from you guys. I am bumping up against a
problem with sending a message from access through outlook. I have copied
code from many of the posts and keep getting a compile error: User-defined
type not defined at objOutlook As New Outlook.Application.
As you can tell, i am at the very beginning of this but i think this is my
biggest hang up. Any help you guys can give would be great.

Bill "newbie"
 
P

pietlinden

I have learned a ton of stuff from you guys. I am bumping up against a
problem with sending a message from access through outlook. I have copied
code from many of the posts and keep getting a compile error: User-defined
type not defined at objOutlook As New Outlook.Application.
As you can tell, i am at the very beginning of this but i think this is my
biggest hang up. Any help you guys can give would be great.

Bill "newbie"

Open a code module. Go to Tools, References, make sure Outlook is
checked and then recompile.
 
T

Tony Toews [MVP]

Bill D. said:
I have learned a ton of stuff from you guys. I am bumping up against a
problem with sending a message from access through outlook. I have copied
code from many of the posts and keep getting a compile error: User-defined
type not defined at objOutlook As New Outlook.Application.
As you can tell, i am at the very beginning of this but i think this is my
biggest hang up. Any help you guys can give would be great.

Once you've gotten the code running you will likely want to consider
using late binding.

Late binding means you can safely remove the reference and only have
an error when the app executes lines of code in question. Rather than
erroring out while starting up the app and not allowing the users in
the app at all. Or when hitting a mid, left or trim function call.

This also is very useful when you don't know version of the external
application will reside on the target system. Or if your organization
is in the middle of moving from one version to another.

For more information including additional text and some detailed links
see the "Late Binding in Microsoft Access" page at
http://www.granite.ab.ca/access/latebinding.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

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