Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > Creating a CommandBar on an Outlook Form through a COM add-in
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 16th April 13:13
dmcnealey
External User
 
Posts: 1
Default Creating a CommandBar on an Outlook Form through a COM add-in


I've been able to do this by using VBScript inside of the Outlook
form.
**********************************************
Option ********

Dim objCommandBar
Dim objTrackingNumBtn
Dim objCB
Dim objInspector

Function Item_Open()
Dim Page
Dim MyControls
Dim i

Const msoControlButton = 1
Const msoButtonIconAndCaption = 3

Set objInspector = Application.ActiveInspector
Set objCommandBar = objInspector.CommandBars.Add("Save to
FileNET",1,False,True)
objCommandBar.Visible = True

Set objTrackingNumBtn = objCommandBar.Controls.Add(msoControlButton)
objTrackingNumBtn.Style = msoButtonIconAndCaption
objTrackingNumBtn.Caption = "Create Tracking Number"
objTrackingNumBtn.TooltipText = "Creates Tracking Number and Logs it
to the DB"
objTrackingNumBtn.Visible = True

End Function

Function Item_Close()
On Error Resume Next
if not (objCommandBar is nothing) then
objCommandBar = nothing
End If

if not (objTrackingNumBtn is nothing) then
objTrackingNumBtn = nothing
End If
if not (objInspector is nothing) then
objInspector = nothing
End If
End Function
**********************************************

However, I haven't been able replicate this behavior through the COM
object. I've been able to create a CommandBar on the main Explorer,
but not on a form.

I think I'm missing something very simple. I just have pieced it
together. Anyone have and help for me?
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666