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

Questions on the OutlookRibbonXCS example



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old March 29th 10, 03:10 PM posted to microsoft.public.developer.outlook.addins,microsoft.public.outlook.interop,microsoft.public.outlook.program_addins,microsoft.public.outlook.program_vba
escamoteur
external usenet poster
 
Posts: 147
Default Questions on the OutlookRibbonXCS example

Hi,

I studied the OutlookRibbonXCS example but don't understand everything completely.

Looking at

public bool ColorWidgetsGroup_GetVisible(Office.IRibbonControl control)
{
Debug.WriteLine("ColorWidgetsGroup_GetVisible");
OutlookInspector window = FindOutlookInspector(control.Context);
if (window != null)
{
Outlook.ContactItem contact = window.CurrentItem;
//Make the group visible only if an address exists
if (String.IsNullOrEmpty(contact.BusinessAddress) &
String.IsNullOrEmpty(contact.HomeAddress) &
String.IsNullOrEmpty(contact.OtherAddress))
{
return false;
}
else
{
return true;
}
}
return false;
}

Why the hassle with the FindOutlookInspector?

It's much easyer to do it like in this Example

public void RibbonCreateFromMailButton_Action(Office.IRibbonCo ntrol control)
{
Outlook.Inspector window = (Outlook.Inspector) control.Context;
if (window != null)
{
Outlook.MailItem item = (Outlook.MailItem) window.CurrentItem;
if (item != null)
{
theApp.Instance.BOManager.CreateBOFromMail(item);
}
}


Or do I miss something important here?
Best
Tom
 




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
Questions on the OutlookRibbonXCS example escamoteur Outlook and VBA 4 March 30th 10 02:32 PM
OE questions fvdasvsd Outlook - General Queries 5 August 14th 07 03:33 PM
OE questions Peter Foldes Outlook Express 2 August 14th 07 03:33 PM
some oe6 questions \Coffeehouse Schmuck\ Outlook Express 3 March 18th 06 02:03 AM
OE 6 questions gregfarr Outlook Express 1 March 4th 06 11:21 PM


All times are GMT +1. The time now is 09:16 AM.


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.