Discussion:
OLE Outlook Error
(too old to reply)
Lane Coddington
2008-10-10 22:50:45 UTC
Permalink
I originally posted this question a month ago in the dde-ole-dll group,
but didn't get much response. Sorry for the cross posting, but I bet
someone else must be having the same problem.

I'm trying to access MS Outlook from dbase. The basic three lines it
takes to open a new email message are:

oOLE = new OLEAutoClient("Outlook.Application")
oMail = oOLE.CreateItem(0)
oMail.Display()

This has worked for me for years, but recently it started give the
error, Error: OLE Unknown error: 0000:0001. It still opens the new
email message.

I'm using Vista, dbase 2.6.1.5, Outlook 2007. On another computer with
XP and Outlook 2003, it also used to work, but now throws up a different
error and doesn't even open the new email message.

I've considered that it might be Norton getting in the way or security
settings in Outlook, but I turned off everything and I still have the
same problem.

I also wonder if it might be recent service packs for XP and Vista.
That's service pack 3 for XP and 1 for Vista. On a third computer with
XP service pack 2 and Outlook 2002, it still works just fine.

Are you having the same problem on your machine? Any ideas?
--
Lane Coddington
Geoff Wass [dBVIPS]
2008-10-11 04:27:43 UTC
Permalink
Post by Lane Coddington
I originally posted this question a month ago in the dde-ole-dll group,
but didn't get much response. Sorry for the cross posting, but I bet
someone else must be having the same problem.
I'm trying to access MS Outlook from dbase. The basic three lines it
oOLE = new OLEAutoClient("Outlook.Application")
oMail = oOLE.CreateItem(0)
oMail.Display()
This has worked for me for years, but recently it started give the
error, Error: OLE Unknown error: 0000:0001. It still opens the new
email message.
I'm using Vista, dbase 2.6.1.5, Outlook 2007. On another computer with
XP and Outlook 2003, it also used to work, but now throws up a different
error and doesn't even open the new email message.
I've considered that it might be Norton getting in the way or security
settings in Outlook, but I turned off everything and I still have the
same problem.
I also wonder if it might be recent service packs for XP and Vista.
That's service pack 3 for XP and 1 for Vista. On a third computer with
XP service pack 2 and Outlook 2002, it still works just fine.
Are you having the same problem on your machine? Any ideas?
Lane,

Could the problem be Outlook 2007? Or Vista?
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada

.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
.|.|.| IT Consultant http://Geoff_Wass.com |.|.|.
Mervyn Bick
2008-10-11 15:02:31 UTC
Permalink
For sure it could be Outlook or Vista. It could also be dbase or
something else. I'm having a heck of a time figuring out where to spend
my time tracking it down. It used to work on Vista with Outlook 2007
with dbase. I'm not sure it ever worked with 2.6.1.5. I just don't know.
It still works on XP, service pack 2 with Outlook 2002 and 2.6.1.5.
I guess I'm hoping some of you with Outlook will run those three lines
of code to help me figure out what is causing the problem.
It's not that I was ignoring you but what I can offer is probably not much
use to you as all the software I have is old. I have resisted the move to
Vista and I haven't udated my ancient copy of Microsoft Office as I've
never needed any of the features of the newer versions.

Still, I have run your three lines of code and it works fine with the
following setup.

Outlook 2000 SR-1
dBase 2.6.0.1
XP Pro SP3

Mervyn.
Lane Coddington
2008-10-11 14:25:18 UTC
Permalink
For sure it could be Outlook or Vista. It could also be dbase or
something else. I'm having a heck of a time figuring out where to spend
my time tracking it down. It used to work on Vista with Outlook 2007
with dbase. I'm not sure it ever worked with 2.6.1.5. I just don't know.
It still works on XP, service pack 2 with Outlook 2002 and 2.6.1.5.

I guess I'm hoping some of you with Outlook will run those three lines
of code to help me figure out what is causing the problem.
Post by Geoff Wass [dBVIPS]
Could the problem be Outlook 2007? Or Vista?
--
Lane Coddington
Geoff Wass [dBVIPS]
2008-10-12 06:18:11 UTC
Permalink
For sure it could be Outlook or Vista. It could also be dbase or
something else. I'm having a heck of a time figuring out where to spend
my time tracking it down. It used to work on Vista with Outlook 2007
with dbase. I'm not sure it ever worked with 2.6.1.5. I just don't know.
It still works on XP, service pack 2 with Outlook 2002 and 2.6.1.5.
I guess I'm hoping some of you with Outlook will run those three lines
of code to help me figure out what is causing the problem.
Post by Geoff Wass [dBVIPS]
Could the problem be Outlook 2007? Or Vista?
Lane,

I don't have Outlook and I use XP so I'm not going to be much help. :-(
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada

.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
.|.|.| IT Consultant http://Geoff_Wass.com |.|.|.
Andrew Shimmin
2008-10-12 01:17:44 UTC
Permalink
I get the error with your 3 lines of code.

WXPP sp3
dBase b2083
M$ Office 2002 sp3

Interestingly, the mail message created opens ready for action and can be modified sent and is received.

regards, andrew
For sure it could be Outlook or Vista. It could also be dbase or
something else. I'm having a heck of a time figuring out where to spend
my time tracking it down. It used to work on Vista with Outlook 2007
with dbase. I'm not sure it ever worked with 2.6.1.5. I just don't know.
It still works on XP, service pack 2 with Outlook 2002 and 2.6.1.5.
I guess I'm hoping some of you with Outlook will run those three lines
of code to help me figure out what is causing the problem.
Post by Geoff Wass [dBVIPS]
Could the problem be Outlook 2007? Or Vista?
Don
2008-10-11 22:27:53 UTC
Permalink
Post by Lane Coddington
I'm trying to access MS Outlook from dbase. The basic three lines it
oOLE = new OLEAutoClient("Outlook.Application")
oMail = oOLE.CreateItem(0)
oMail.Display()
I'm using Vista, dbase 2.6.1.5, Outlook 2007. On another computer with
XP and Outlook 2003, it also used to work, but now throws up a different
error and doesn't even open the new email message.
Lane Coddington
Lane

When I run thoes lines from a prg file using Vista and Dbase 2.6.1.5

The error is Outlook.Application not in Registry; Didnt Microsoft change the name of the email program in vista?

Don
Lane Coddington
2008-10-12 15:14:37 UTC
Permalink
Not that I know of. Do you have Outlook installed?
Post by Don
When I run thoes lines from a prg file using Vista and Dbase 2.6.1.5
The error is Outlook.Application not in Registry; Didnt Microsoft change the name of the email program in vista?
Don
--
Lane Coddington
Don
2008-10-12 18:10:12 UTC
Permalink
Post by Don
Post by Lane Coddington
I'm trying to access MS Outlook from dbase. The basic three lines it
oOLE = new OLEAutoClient("Outlook.Application")
oMail = oOLE.CreateItem(0)
oMail.Display()
I'm using Vista, dbase 2.6.1.5, Outlook 2007. On another computer with
XP and Outlook 2003, it also used to work, but now throws up a different
error and doesn't even open the new email message.
Lane Coddington
Lane
When I run thoes lines from a prg file using Vista and Dbase 2.6.1.5
The error is Outlook.Application not in Registry; Didnt Microsoft change the name of the email program in vista?
Don
Lane

My Email program that was standard when I bought my Vista Machine ~ 6mos ago is called Windows Mail?

Don
Lane Coddington
2008-10-12 18:35:43 UTC
Permalink
Yes, I think you're right that Windows Mail used to be called Outlook
Express. The problem I'm talking about is with Outlook which is the
email program that comes with MS Office.
Post by Don
My Email program that was standard when I bought my Vista Machine ~ 6mos ago is called Windows Mail?
--
Lane Coddington
Lane Coddington
2008-10-12 16:03:40 UTC
Permalink
Ok, so far this is what we have learned. Running these three lines on
computers with Outlook gives the following results.

oOLE = new OLEAutoClient("Outlook.Application")
oMail = oOLE.CreateItem(0)
oMail.Display()

Vista Service Pack 1, Outlook 2007, dBase 2.6.1.5, error
XP Service Pack 3, Outlook 2003, dBase 2.6.1.5, error
XP Service Pack 2, Outlook 2002, dBase 2.6.1.5, no error
XP Service Pack 2, Outlook 2002, dBase 2.6.1.3, no error
XP Service Pack 3, Outlook 2000, dBase 2.6.0.1, no error
XP Service Pack 3, Outlook 2002, dBase 2.6.1.5, error

Not quite enough results to make any conclusions, but it might be newer
service packs of Windows or Outlook causing the problem. I hope we get a
few more results to make this clearer.
Post by Lane Coddington
Are you having the same problem on your machine? Any ideas?
--
Lane Coddington
Bowen Moursund [DataTech]
2008-11-05 16:08:33 UTC
Permalink
Post by Lane Coddington
oOLE = new OLEAutoClient("Outlook.Application")
oMail = oOLE.CreateItem(0)
oMail.Display()
This has worked for me for years, but recently it started give the
error, Error: OLE Unknown error: 0000:0001. It still opens the new
email message.
You can bypass the error:

try
oMail = new
OLEAutoClient("Outlook.Application").CreateItem(0).Display()
catch(exception e)
endtry
--
Bowen Moursund
Lane Coddington
2008-11-05 23:37:34 UTC
Permalink
Well, that's awfully simple. Where were you a week ago before I bought a
copy of MarshallSoft's Email engine (which works well)? Thanks.
--
Lane Coddington
try
oMail = new OLEAutoClient("Outlook.Application").CreateItem(0).Display()
catch(exception e)
endtry
Loading...