September 8th, 2009, 01:38 AM
VB6 Outlook 2007 automation
We have a large VB6 application in our enterprise which normally occupies ~30 MB of RAM.
We have some simple outlook automation in the application, which opens a new message window.
Code reproduced here.
Dim objOutlook As Outlook.Application
Dim objMailItem As Outlook.MailItem
Set objOutlook = CreateObject("Outlook.Application")
Set objMailItem = objOutlook.CreateItem(0) 'The constant olMailItem = 0
objMailItem.To = Recipients
Set objOutlook = Nothing
Set objMailItem = Nothing
The application works fine with Outlook 2003. With outlook 2007, I get the error 429 "ActiveX component can't create object".
This error doesn't come when I use the same code in a sample application, but comes when used in the large application.
Does VB6 impose any limitations on the process size, which could be leading to this error?
Please also let me know if there are any other ways of achieving the same functionality without resorting to the outlook 12.0 library.
Thanks in advance.
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.