Some problems in Outlook2003

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have written a COM to connect to Outlook application, it works fine in Outlook2000,Outlook XP but not all OUtlook 2003

Currently in the OnConnection Event i place the following

Set AppInstance = Application
Set l_application = Application
Set g_explorer = Application.ActiveExplorer
Set g_activeinspector = Application.Inspectors
 
That doesn't sound like a security problem. Does the laptop start up
something like a synch program that would start Outlook with no Explorers
and are you checking that there is an Explorer before you do your
On_Connection initialization code?

Look at the ItemsCB COM addin sample written in VB 6 from the Resources page
at www.microeye.com for a look at best practices COM addin template. I use
similar templates and haven't had any problems with my addins adding buttons
in Outlook 2003.




"Problems in some Outlook2003 environment" <Problems in some Outlook2003
(e-mail address removed)> wrote in message
Hi,

I have written a COM to connect to Outlook application, it works fine in
Outlook2000,Outlook XP but not all OUtlook 2003
Currently in the OnConnection Event i place the following

Set AppInstance = Application
Set l_application = Application
Set g_explorer = Application.ActiveExplorer
Set g_activeinspector = Application.Inspectors
.
.
.

the above will set my global variables (with events) so that i can trap
related events that i want to code
I wrote a function to add a toolbarbutton in Outlook toolbar

Function uf_addtoolbar()

Set cbToolBar = Application.ActiveExplorer.CommandBars("Standard")
.
.
.
.

the above will try to get the toolbar object so that i can add a control to it

With reference to uf_addtoolbar(), i encounterd an error when my
breakpoint hits at the set cbtoolbar line
error = specified module not found

the funny thing is that it only happen in certain environment, I have the
same code running on Outlook 2003 on some desktop PC and they are running
fine. However my boss's notebook encountered this error.
Is there any security features implemented in Outlook 2003 which results
in the problem which i am facing ?
Note:
Besides using VBCOM, i also wrote a powerbuilder program to connect to Outlook 2003 using OLE Object

However with the same notebook environment, I face the error even my codes
just gets the simplest of property -> ole_app.Version (error accessing
external object properties)
 
That's not due to Outlook 2003, it's due to a faulty installation of
Office/Outlook or some weird security restriction on the laptop or due to
running one of those pesky script stoppers like the ones from Norton or
McAfee.

I'd first check to see if a script stopper is running. If it is disable it
and see if that helps.

Then I'd do a Detect and Repair on the installation from the Outlook Help
menu.




Kwan Thean Keong said:
Thanks Ken for the reply

Actually what puzzles me is that I can't seem to even connect to Outlook application

eg:

Using VBA

I tried

Dim l_ole as Object
Set l_ole = CreateObject("outlook.application") ' this line of code returns me error


However if i change to connect to
Set l_ole = CreateObject("word.application")

I did not encounter any error

The most bizzare thing is that, it only happens in my boss's notebook.

I put the same code in another desktop PC, works fine ....


One thing which might differ in environment is that my boss's outlook is
registered while the desktop one is still a trial version, but that should
not make any difference right
At the end of the day, I am just confused on why my COM and Powerbuilder
codes which works fine in Outlook 2000,XP and even Outlook 2003 in desktop
but not in the notebook of my boss ....
 
Back
Top