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

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

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


Dear Norman,

Can you please how can i make this?

I do not know to add a reference..

Thanks,
 
 
 

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

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

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...

 
 
 

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

Post by Bob Philli » Mon, 05 Jun 2006 18:08:27

Are you sure about that (Tools>References), 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)






a
situation...
 
 
 

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

Post by Norman Jon » Mon, 05 Jun 2006 18:20:39

Hi SupperDuck,

Providing I had set a reference to the Microsoft Outlook Object Library (In
the VBE, Tools | References), I could not repoduce your error.

Incidentally, but with no bearing on your problem, perhaps your code should
read:

Dim myOlApp As Outlook.Application
Dim myItem As Outlook.MailItem

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


---
Regards,
Norman
 
 
 

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

Post by U3VwcGVyRH » Mon, 05 Jun 2006 20:02:01

Hello Norman,

Thank your for replies. The problem was, when two Excel files are opened and
i select the Microsoft outlook object library, there is a probability of not
been seen by one of the files.

Is there a way for selecting these libraries, in all excel files including
the new opened ones?

Thanks...
 
 
 

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

Post by Norman Jon » Mon, 05 Jun 2006 20:12:31

Hi SupperDuck,

References are specific to a given workbook.

If you wish to add a reference to all new workbooks, open the workbook
template ( in my case, Book.xlt in my XLSTART folder), add the required
reference(s), save and close the template.


---
Regards,
Norman
 
 
 

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

Post by Bob Philli » Mon, 05 Jun 2006 20:56:15

Why don't you use late binding then. See
http://www.yqcomputer.com/

--
HTH

Bob Phillips

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



and
not

(In
should


11.0
 
 
 

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

Post by VHJlZm9 » Thu, 03 Aug 2006 15:36:01

Bob,

Is it possible to check if Outlook is actually installed (via VBA) without
running into the Reference error?
--
Trefor