vs 2005 - adding toolbar in office 2003

  • Thread starter Thread starter yonido
  • Start date Start date
Y

yonido

Hello friends,
I need your help. I got an assignment and I'm working on it for two
days with no breakthrough.
I need to add a toolbar in outlook. It suppose to contain several
buttons\checkbox (I still don't know how many) that will indicate on
user decisions.
It also contains a new "Send" button that will send the message but
will consider the user decisions.

In samples that I saw it implemented by creating a office.commandbar
and some office.commandbarbuttons .
First of all I need checkbox. Moreover I want to be able to control the
location of each button.
In other words is there any way to create a usercontrol and combine it
in the outlook as a toolbar? Is it possible to connect it to the
messages?

I'm working with visual studio 2005 and outlook 2003

Thanks
John
 
You can't add anything with a checkbox. You would need to set up a button
that opens your own form if you need checkboxes.

Variable numbers of buttons displayed when you select a popup control can
only be done if you set up a dynamic collection of button handler classes
and add/remove buttons from that collection as needed.
 
Hi ken,
But is it possible to add my own form to an office toolbar? How?
I tried to use panel and it didn't work out. Which outlook object
should I use in order to attach it a form and that it'll be showed in
the tool-bar area?

The idea that it'll appere at the toolbar zone and will be attached to
the mails below.
Thanks again
John
 
John,

object omissing = System.Reflection.Missing.Value;
MyButton =
(Office.CommandBarControl)oStandardBar.Controls.Add(Microsoft.Office.Core.MsoControlType.msoControlActiveX,

omissing, omissing, omissing, omissing);
MyButton.Caption = "My Custom Button5";
Microsoft.Office.Core._CommandBarActiveX activeXControl = MyButton
as
Microsoft.Office.Core._CommandBarActiveX;
activeXControl.ControlCLSID =
"{830C63B8-6C8A-4b64-99F2-237319703D8F}";

MyButton.Width = 32;
MyButton.Height = 32;

Just Create A Control Like This:

Imports System.Windows.Forms
Imports System.Collections.Generic
Imports System.Runtime.InteropServices
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
<Guid("54A09908-051E-46ec-8210-30A01A0C8F5C")> _
Partial Class Test
Inherits System.Windows.Forms.ListBox
'Control overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
<Runtime.InteropServices.ComVisible(True)> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub
Private components As System.ComponentModel.IContainer
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
components = New System.ComponentModel.Container()
End Sub
End Class

After That you will be able any control that you create from .Net in
Outlook Toolbar Groups.
 
I don't know of any ways other than the ones suggested by others in this
thread.
 
I think I didn't explained my problem. I want to add a
usercontrol\component to which I'll add my components. I want it to be
placed in the tool-bar area. Moreover I want it to comunicate with the
mails. Passing through the messages will change the details in my
user-control
thanks
John
 
I think I didn't explained my problem. I want to add a
usercontrol\component to which I'll add my components. I want it to be
placed in the tool-bar area. Moreover I want it to comunicate with the
mails. Passing through the messages will change the details in my
user-control
thanks
John
 
As I said, I know of no ways to do that other than the suggestions in this
thread.




I think I didn't explained my problem. I want to add a
usercontrol\component to which I'll add my components. I want it to be
placed in the tool-bar area. Moreover I want it to comunicate with the
mails. Passing through the messages will change the details in my
user-control
thanks
John
 
Back
Top