Error haunting me!!


G

Greg Smith

I use the following code in a form of mine:
Set objSession = Application.CreateObject("MAPI.session")

If works on 99.9% of the machines out in my site.
But on a few, it gives an internal application error.

What I am trying to do is access the GAL via a command
button. The machines that are having issues are running
Windows NT or 2000 with Outlook 2k or Outlook 2k w/sp1.

But the thing is, it's not consistant with OS or Office
version. I cannot reproduce it. And ideas on what to look
for??
 
Ad

Advertisements

K

Ken Slovak - [MVP - Outlook]

Is CDO installed on all those systems? It's an optional installation
for Outlook 2000 and later.

Also, try using CreateObject without prepending Application and see if
that helps.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm
 
G

Greg Smith

CDO was it!!! Thanks a lot Ken!!
Is there a code example that will allow me to look and see
if CDO is installed and if not - display a warning that
the user needs CDO installed?
-----Original Message-----
Is CDO installed on all those systems? It's an optional installation
for Outlook 2000 and later.

Also, try using CreateObject without prepending Application and see if
that helps.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm


Greg Smith said:
I use the following code in a form of mine:
Set objSession = Application.CreateObject ("MAPI.session")

If works on 99.9% of the machines out in my site.
But on a few, it gives an internal application error.

What I am trying to do is access the GAL via a command
button. The machines that are having issues are running
Windows NT or 2000 with Outlook 2k or Outlook 2k w/sp1.

But the thing is, it's not consistant with OS or Office
version. I cannot reproduce it. And ideas on what to look
for??


.
 
Ad

Advertisements

K

Ken Slovak - [MVP - Outlook]

Sure, to see if CDO is installed you can just try to instantiate a
MAPI.Session object and if it fails no CDO (or some major error).

There's a great sample COM addin called ItemsCB on the Resources page
at www.microeye.com that shows not only how to detect CDO but to
demand install it if it's not installed, using the Windows Installer
object library and the FeatureInstall method.

The VB sample code for that can be translated into VBScript to use for
form code.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm
 

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