Thisoutlooksession contains macros warning with a VB6 COM add-in in OL2002

S

Scott Brown

I am receiving a very perplexing Thisoutlooksession contains macros
warning message when accessing my com add-in from Outlook 2002 running
on Windows XP. The COM add-in was compiled in VB6. Tried compiling
natively as well as to p-code. The functions are being accessed by
clicking on Commandbar buttons that the com add-in creates (it first
creates its own command bar and then creates the individual buttons).

I used to have some VBA code in Thisoutlook session for testing
purposes. When I did, the Macros warning came up as soon as outlook
loaded. I have since removed the VBA code from the Outlook Visual
Basic Editor. Now the warning message does not come up anymore when
Outlook loads. But for some strange reason, the warning comes up when
I click a command bar button for my com add-in. The com add-in code
behind the commandbar buttons I'm clicking do not attempt to access
any Outlook database info (like address book data, etc.). They just
retreive some info from an Access database. Whether I click the
"Enable Macros" or "Disable Macros" button makes no difference: the
Com add-in functions work as designed.

Some other info that may be helpful/interesting: the com add-in is
activated when Outlook starts up. It instantiates an Outlook
application object as well as some subsidiary objects like a reference
to the Inbox. The Macros warning does not appear while any of this is
happening. So when I click a command bar button, the add-in has
already been accessing the Outlook application object for some time.

Does anyone have any thoughts as to what could be causing this strange
problem? By the way I have another machine running Outlook 2000 where
this is not an issue. Seems to be something about Outlook 2002.

Thanks very much

Scott Brown
 

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