View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default "User-defined type not defined" error when trying to send e-ma

Are you sure about that (ToolsReferences), as that is exactly the error
that you get if you don't set a reference to the Outlook type library.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"SupperDuck" wrote in message
...
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,