View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
SupperDuck SupperDuck is offline
external usenet poster
 
Posts: 44
Default "User-defined type not defined" error when trying to send e-ma

Ah sorry, adding the same things.

In my first post i forgot to write that there was Microsoft Outlook 11.0
Object library .

There is it but still have problem...

"Norman Jones" wrote:

Hi SupperDuck,

You need to add a reference to the Microsoft Outlook xxx Object Library.


---
Regards,
Norman



"SupperDuck" wrote in message
...
Dear all,

I want to send e-mail via a list in a excel document so i try to write a
macro.
In my macro, for outlook i use the code;

Dim OutApp As New Outlook.Application
Dim OutMail As Outlook.MailItem

Set myOlApp = New Outlook.Application
Set myItem = myOlApp.CreateItem(olMailItem)


But i got an error " user-defined type not defined"

I selected the

Visual basic for applications
Microsoft Excel 11.0 Object library
OLE Automation
Microsoft Office 11.0 Object Library
Microsoft DAO 3.6 Object Library.


So i wonder where the problem is and need your help in this situation...

Kind regards,