Toolbar Button in New Message Window

Add-in Express™ Support Service
That's what is more important than anything else

Toolbar Button in New Message Window
 
Ganesh Agrawal




Posts: 8
Joined: 2004-11-01
I am hiting the following code correctly when I click on the New Message in Outlook 2003.

The issue is with line ////*****//// the New Message Window comes up after this line & does not show my ToolBar button.

What is wrong here, can anyone help.

Thanks

Ganesh

private void Inspectors_NewInspector(Outlook.Inspector i)
{
CommandBars oCommandBars;
CommandBar oStandardBar;
oCommandBars =i.CommandBars;
oStandardBar = oCommandBars["Standard"]; ////*****////

MyButton2 = (CommandBarButton)oStandardBar.FindControl(System.Reflection.Missing.Value,
System.Reflection.Missing.Value,
"MyButton2",System.Reflection.Missing.Value,
System.Reflection.Missing.Value);
if(MyButton2 == null)
{
MyButton2 = (CommandBarButton)oStandardBar.Controls.Add(MsoControlType.msoControlButton,
System.Reflection.Missing.Value,
System.Reflection.Missing.Value,
System.Reflection.Missing.Value,
false);
MyButton2.Caption = "MyButton2";
MyButton2.Style = MsoButtonStyle.msoButtonIconAndCaption;
MyButton2.FaceId = 3;
MyButton2.TooltipText = "MyButton2";
MyButton2.BeginGroup = false;
MyButton2.Tag = "MyButton2";
}
MyButton2.OnAction = "<EMailStatsAddIn.Connect>";
MyButton2.Visible = true;
MyButton2.Click += new Microsoft.Office.Core._CommandBarButtonEvents_ClickEventHandler(this.MyButton2_Click);
}
Posted 19 Nov, 2004 18:31:42 Top
Guest


Guest


Hi Ganesh,

I have just tested your code. All work fine.
Try to conclude your code in the <try...catch> code block. May be you will get an error.
Posted 20 Nov, 2004 06:39:02 Top
Ganesh Agrawal




Posts: 8
Joined: 2004-11-01
Do you get the MyButton2 Toolbar button in the New Message Window.

Can you please tell me the which Outlook version are you using, SP if any.

Also what Outlook Interop are you connecting to.

I will apprecaite if you can zip up the sample code you are using & send me to agrawal_g@hotmail.com

Thanks
Posted 22 Nov, 2004 14:52:51 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Hi Ganesh,

I have Outlook 2003 without any SPs. I use Outlook 2000 Interop in my ADX project. What ADX version do you use?
Posted 23 Nov, 2004 05:24:01 Top
Ganesh Agrawal




Posts: 8
Joined: 2004-11-01
I am not using ADX version.
Posted 23 Nov, 2004 12:40:43 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Sorry, Ganesh.
I can only send you an ADX example project if you wish.
Probably, you will estimate the ability of Add-in Express.
Posted 24 Nov, 2004 05:52:36 Top
Ganesh Agrawal




Posts: 8
Joined: 2004-11-01
Thanks Sergey, I am interested in looking into the capabilities of the ADX. I need following functionalities as part of Outlook 2003 & Outlook 2002
1. Should be able to put the New CommandBar Button in the New Message Window. I think this is possible.
2. When the click event happens on this Button in the New Message Window, I should be able to extract the actual message & all the attachments with path & do my processing.
3. Should not throw me any security warning when I click on the Command Bar button in the New Message Window.
4. When I am done with processing I should be able to replace the actual message & the attachments with the processed one in the New Message Window where I invoked the processing.

Do you think ADX will be a good choice & will make my job easier. I am currently developing using C#.NET 2003 & Was able to put the Command Bar button on the New Message window without the ADX, but I am getting the security warning from Outlook.

Pls. convey if you need any more info, looking forward to hear from you.

Thanks for your time.

Ganesh Agrawal
Posted 06 Dec, 2004 13:40:12 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Hi Ganesh,

Surely ADX will make your work more productive. With ADX it is possible to perform all listed above quicker than you would do manually. Next week we are publishing a new ADX version where components of Office application events are added including Outlook events.
As for Outlook security warning, today we are publishing Outlook Security Manager component that prevents such warnings from appearing. You will be able to use it in your ADX based projects.
Posted 07 Dec, 2004 07:19:53 Top