A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Compile error?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 2nd 08, 03:42 PM posted to microsoft.public.outlook.program_vba
CAM
external usenet poster
 
Posts: 12
Default Compile error?

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
Ads
  #2  
Old March 2nd 08, 07:45 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Compile error?

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

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


"Cam" wrote in message news
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

  #3  
Old March 3rd 08, 01:25 PM posted to microsoft.public.outlook.program_vba
CAM
external usenet poster
 
Posts: 12
Default Compile error?

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?


"Sue Mosher [MVP-Outlook]" wrote:

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

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


"Cam" wrote in message news
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


  #4  
Old March 3rd 08, 03:33 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Compile error?

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


"Cam" wrote in message ...
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?


"Sue Mosher [MVP-Outlook]" wrote:

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



"Cam" wrote in message news
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


  #5  
Old April 23rd 08, 12:09 PM posted to microsoft.public.outlook.program_vba
Elaine Eardley
external usenet poster
 
Posts: 1
Default Compile error?



"Sue Mosher [MVP-Outlook]" wrote:

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

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


"Cam" wrote in message news
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


Having the same problem as the user above - resolution offered still not
working, can you help?
  #6  
Old April 23rd 08, 02:43 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Compile error?

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


"Elaine Eardley" Elaine wrote in message ...


"Sue Mosher [MVP-Outlook]" wrote:

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

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


"Cam" wrote in message news
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


Having the same problem as the user above - resolution offered still not
working, can you help?

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Virtual PC to compile add-in question Mike Outlook and VBA 1 May 16th 07 04:25 PM
Outlook.MAPIFolder: for each compile error spareway Add-ins for Outlook 1 January 29th 07 02:05 PM
Project Won't Run or Compile Ron Outlook and VBA 6 January 23rd 07 02:24 AM
What is: Compile Error in hidden module: AutoExecNew Guitar125 Outlook and VBA 1 July 7th 06 05:52 AM
How do I compile statistics about meetings? Stu Detroit Outlook - Calandaring 0 March 9th 06 09:25 PM


All times are GMT +1. The time now is 05:04 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.