Compile error?

C

Cam

Hello,

I have a macro to send out an attachment from Outlook.
But when I ran the macro, it gave me this error. What is this error and how
can I fix it. Thanks

Compile error:
User-defined type not defined

An the error code seem to point to my first line of the code.

Dim objOutlook As Outlook.Application
Dim objOutlookRecip As Outlook.Recipient
Dim path As String
 
S

Sue Mosher [MVP-Outlook]

Use the Tools | References command to add a reference to the Microsoft Outlook library.
 
C

Cam

Sue,

Thanks for the suggestion, but I am not sure what you meant by it. Where or
how do I go to add a reference to the MS Library?
 
S

Sue Mosher [MVP-Outlook]

You're creating a macro, right? A macro in some other Office application, right? Then, in the VBA environment, click Tools, then References. You'll see a list of code libraries you can add to the project, including that for Outlook.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
 
S

Sue Mosher [MVP-Outlook]

Please provide detailed information on what "the same problem" means exactly, including your Outlook version, what statement triggers the error, etc.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
 
Top