Late Binding with Outlook

M

matelot

I am trying to setup so I don't have to select the library in
Tools/references. I get "Run-time error 429: ActiveX component can't create
object". Isn't that correct to setup for a late binding?

Dim OutApp As Object
Dim OutMail As Object

Set OutApp = CreateObject("Object.Application")
Set OutMail = CreateObject("Outlook.MailItem")

Thanks
 
M

matelot

I was able to find the fix from ron de bruin website
Change outmail to Set OutMail = OutApp.CreateItem(0)
However, I get the warning message from Outlook that the attachment may
contain virus. Is it possible to hide the warning message completely from
Excel VBA?
 
D

Dave Patrick

Shouldn't that be?

Set OutApp = CreateObject("Outlook.Application")

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
|I am trying to setup so I don't have to select the library in
| Tools/references. I get "Run-time error 429: ActiveX component can't
create
| object". Isn't that correct to setup for a late binding?
|
| Dim OutApp As Object
| Dim OutMail As Object
|
| Set OutApp = CreateObject("Object.Application")
| Set OutMail = CreateObject("Outlook.MailItem")
|
| Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top