"User-defined type not defined" error when trying to send e-mail

"User-defined type not defined" error when trying to send e-mail

Post by U3VwcGVyRH » Mon, 05 Jun 2006 17:26:01


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,
 
 
 

"User-defined type not defined" error when trying to send e-mail

Post by Norman Jon » Mon, 05 Jun 2006 17:40:30

Hi SupperDuck,

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


---
Regards,
Norman