Email a report as a PDF

A

AlwaysLearning

I am using Access 2003.

When setting up my code, obtained from this site, to automate sending emails
with a PDF attachment I receive a compile error saying:
"User-defined type not defined."

The line highlighted with the error is:

Dim olApp As Outlook.Application

Is there something I have to add to Access to have it recognize the above.
 
D

Daniel Pineault

You appear to be using early binding. As such, have you set the required
reference to the Outlook Library?

Tools - References
Check the 'Microsoft Outlook X.X Object Library'
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 
A

AlwaysLearning

My Access doesn't have a Reference item under the Tools menu. Is this
something
removed by my corporate technology wizards?
 
D

Daniel Pineault

It should be there under the VBE window. You have to be in the Visual Basic
Editor and not the Basic database window.

.... Insert Debug Run Tools Add-Ins ...
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 
A

AlwaysLearning

I'm not that experienced in getting around in Basic. Please forgive my
continued questions.

When I open an event isn't that putting me into the VBE Window? If that is
the correct place then I do not see a Reference Item. If I am in the Basic
Database window how do I open the VBE window?
 
D

Daniel Pineault

If you select to edit an event which and it states '[Event Procedure]', then
yes you will end up in the VBE. An alternate method of getting there is to
simply press Alt-F11 from the main database window.

Do you have any toolbars at the present time? Do you have any of the
previously listed menu options?

File Edit View Insert Debug Run Tools Add-Ins Window Help
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 
D

Daniel Pineault

For a visual of what you are looking for, see

http://www.cpearson.com/excel/References.htm
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.



Daniel Pineault said:
If you select to edit an event which and it states '[Event Procedure]', then
yes you will end up in the VBE. An alternate method of getting there is to
simply press Alt-F11 from the main database window.

Do you have any toolbars at the present time? Do you have any of the
previously listed menu options?

File Edit View Insert Debug Run Tools Add-Ins Window Help
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.



AlwaysLearning said:
I'm not that experienced in getting around in Basic. Please forgive my
continued questions.

When I open an event isn't that putting me into the VBE Window? If that is
the correct place then I do not see a Reference Item. If I am in the Basic
Database window how do I open the VBE window?
 
A

AlwaysLearning

Thank you for all your help. I did finally find the reference item and was
able to check the Microsoft Outlook Object Library.

Unfortunately, Access crashed and created errors in my data base. Compact
and repair is not working. It couldn't even create a backup. I need to
restore and start again. But that's another problem.

Thanks again.

Daniel Pineault said:
If you select to edit an event which and it states '[Event Procedure]', then
yes you will end up in the VBE. An alternate method of getting there is to
simply press Alt-F11 from the main database window.

Do you have any toolbars at the present time? Do you have any of the
previously listed menu options?

File Edit View Insert Debug Run Tools Add-Ins Window Help
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.



AlwaysLearning said:
I'm not that experienced in getting around in Basic. Please forgive my
continued questions.

When I open an event isn't that putting me into the VBE Window? If that is
the correct place then I do not see a Reference Item. If I am in the Basic
Database window how do I open the VBE window?
 

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