A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Can't get CommandBars in 2007, works in other Outlook versions?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 14th 07, 01:18 AM posted to microsoft.public.outlook.program_addins
Beiley
external usenet poster
 
Posts: 4
Default Can't get CommandBars in 2007, works in other Outlook versions?

My COM Add-in for Outlook works fine in 2000, XP, and 2003, but in
2007 I can't get the CommandBars. I get an exception when I try.
Here is my code:


Outlook::_Explorer* spExplorer = g_ppvApplication-ActiveExplorer();
if( spExplorer != NULL )
{
Office::_CommandBarsPtr spCmdBars;
try
{
spCmdBars = spExplorer-CommandBars;
}
catch(...)
{
// This gets called in Outlook 2007 only!
Why??

DebugTrace( DEBUG_TRACE_BASIC, "Failed to get CommandBars\n");
return;
}
}

This code is being called from my 'OnStartupComplete' function. Any
ideas/suggestions?

Thanks,
Mark
http://www.beiley.com

Ads
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Office 2007 Beta - installer no longer works :( Paul PJ Seidel Outlook - Installation 2 December 11th 06 12:01 AM
Drafts folder no longer has a pencil icon, but works correctly (Outlook 2007) [email protected] Outlook - General Queries 0 December 5th 06 10:59 PM
Outlook 2007 no more works after Technical Refresh Ernst Kessler Outlook - Installation 0 September 30th 06 11:22 AM
Outlook commandbars once more Marcin Junger Add-ins for Outlook 1 September 12th 06 07:18 PM
Outlook commandbars Radiohead Add-ins for Outlook 1 January 25th 06 03:35 PM


All times are GMT +1. The time now is 08:59 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.