Problem in permanent type add-in toolbar

Hi, I have been facing a issue with dealing with my add-in toolbar. I want to 
make my toolbar permanent so that use can hide and reposition it 
permanently(even after restarting Outlook).  At the same time, I want to 
support my add-in toolbar for all opened Outlook explorer.

I want to make sure that at any point of time there must be one and only one 
toolbar on any Outlook window. I have tried below methods but none worked:

1. Tried deleting toolbar on shutdown.  This doesn't delete the toolbar and 
each restarting outlook adds new toolbar.

Private Sub AddinInstance_OnBeginShutdown(custom() As Variant)
    MyCommandBar.Delete
End Sub

Private Sub AddinInstance_Terminate()
    MyCommandBar.Delete
End Sub

2. I tried deleting toolbar on Explorer close event but didn't work. 
Whenever I open Outlook folder by right clicking it and selecting "Open in 
new window", it keep adding new toolbar but does't delete.

Private Sub myExpl_Close()
    MyCommandBar.Delete
    If out_appt.Explorers.Count < 1 Then
        Set myExpl = Nothing
        Set myColExpl = Nothing
    End If
End Sub

3. Tried checking existence of toolbar but this will not add toolbar when I 
right click on outlook folder and open in new window.

    Set MyCommandBar = myExpl.CommandBars.Item(TOOLBARNAME)
    If Not MyCommandBar Is Nothing Then
        MsgBox "exists"
        Exit Sub
    End If

Could anyone please help me here. I think if I can do any of below then I 
would all set here:
   1.  Delete existing toolbar while closing explorer event
   2. Check the existing of toolbar explorer wise. Though I am setting 
myExpl to currently active  explorer, my code always returns true for 
"myExpl.CommandBars.Item(TOOLBARNAME)" whenever I open outlook folder in new 
window.

Thanks.

=== MY CODE ===

Option Explicit
Public out_appt As Outlook.Application
Public WithEvents MyButton As Office.CommandBarButton
Public MyCommandBar As Office.CommandBar
Public WithEvents myColExpl As Outlook.Explorers
Public WithEvents myExpl As Outlook.Explorer 
Private Sub AddinInstance_OnConnection(ByVal Application As Object, _
   ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, _
   ByVal AddInInst As Object, custom() As Variant)
    Set out_appt = Application
End Sub 
Private Sub AddinInstance_OnStartupComplete(custom() As Variant)
    Set myColExpl = out_appt.Explorers
    If out_appt.Explorers.Count > 0 Then
        Call CreateToolBar
    End If
    Exit Sub
End Sub 
Private Sub myColExpl_NewExplorer(ByVal Explorer As Outlook.Explorer)
    If myExpl Is Nothing Then
        Set myExpl = Explorer
    End If 
    If out_appt.Explorers.Count > 0 Then
        Call CreateToolBar
    End If
End Sub 
Private Sub myExpl_Close()
    MyCommandBar.Delete
    If out_appt.Explorers.Count < 1 Then
        Set myExpl = Nothing
        Set myColExpl = Nothing
    End If
End Sub 
Private Sub MyButton_Click(ByVal Ctrl As Office.CommandBarButton, 
CancelDefault As Boolean)
    On Error Resume Next
    MsgBox "button clicked"
End Sub 
Private Sub CreateToolBar()
    If out_appt.Explorers.Count = 0 Then
        Exit Sub
    End If 
    Set myExpl = out_appt.ActiveExplorer 
    Const TOOLBARNAME = "My Toolbar"
 
'    Set MyCommandBar = myExpl.CommandBars.Item(TOOLBARNAME)
'    If Not MyCommandBar Is Nothing Then
'        MsgBox "exists"
'        Exit Sub
'    End If
'
    Set MyCommandBar = myExpl.CommandBars.Add(TOOLBARNAME, msoBarTop, False, 
False)
    Set MyButton = MyCommandBar.Controls.Add(msoControlButton, , "890", , 
False)
    With MyButton
        .Caption = "&Foo Button"
        .Enabled = True
        .OnAction = "!<PermToolbarTesting.Connect>"
        .Tag = "890"
        .FaceId = 362
        .Style = 3
        .Visible = True
    End With
    MyCommandBar.Visible = True
End Sub

0
Utf
12/15/2009 9:44:01 AM
outlook.program_vba 490 articles. 0 followers. Follow

6 Replies
967 Views

Similar Articles

[PageSpeed] 41

I'll answer this one. Don't make your UI permanent. That would leave it 
there even if your addin isn't running or even if it's uninstalled. Always 
add any UI you add as temporary.

You should be using different Explorer objects for each open Explorer in the 
Explorers collection. You add an Explorer class wrapper to a collection when 
a new Explorer is opened and remove it when it is closed. You do that in 
Explorers.NewExplorer(). The wrapper class should declare any Explorer 
events you intend to handle as well as your CommandBarButton events and 
declarations for your UI and any folder events.

When you add an Explorer to your wrapper collection you then add the UI in 
the first Explorer.Activate() event. For an initial Explorer you bypass 
that. You hold a key value that's an index into the collection for each open 
Explorer. You add that to a Tag value to get a unique Tag value for each 
menu/toolbar/button. That way you can identify each one and get unique 
clicks for each.

You can download a template project in VB6 that shows how to work with 
wrapper classes like that from 
http://www.slovaktech.com/outlook_2007_templates.htm, it is set up for 
Outlook 2007 use with VB6.

-- 
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"paresh" <paresh@discussions.microsoft.com> wrote in message 
news:9ADF7445-9157-41EC-AD5C-FD66C820F667@microsoft.com...
> Hi, I have been facing a issue with dealing with my add-in toolbar. I want 
> to
> make my toolbar permanent so that use can hide and reposition it
> permanently(even after restarting Outlook).  At the same time, I want to
> support my add-in toolbar for all opened Outlook explorer.
>
> I want to make sure that at any point of time there must be one and only 
> one
> toolbar on any Outlook window. I have tried below methods but none worked:
>
> 1. Tried deleting toolbar on shutdown.  This doesn't delete the toolbar 
> and
> each restarting outlook adds new toolbar.
>
> Private Sub AddinInstance_OnBeginShutdown(custom() As Variant)
>    MyCommandBar.Delete
> End Sub
>
> Private Sub AddinInstance_Terminate()
>    MyCommandBar.Delete
> End Sub
>
> 2. I tried deleting toolbar on Explorer close event but didn't work.
> Whenever I open Outlook folder by right clicking it and selecting "Open in
> new window", it keep adding new toolbar but does't delete.
>
> Private Sub myExpl_Close()
>    MyCommandBar.Delete
>    If out_appt.Explorers.Count < 1 Then
>        Set myExpl = Nothing
>        Set myColExpl = Nothing
>    End If
> End Sub
>
> 3. Tried checking existence of toolbar but this will not add toolbar when 
> I
> right click on outlook folder and open in new window.
>
>    Set MyCommandBar = myExpl.CommandBars.Item(TOOLBARNAME)
>    If Not MyCommandBar Is Nothing Then
>        MsgBox "exists"
>        Exit Sub
>    End If
>
> Could anyone please help me here. I think if I can do any of below then I
> would all set here:
>   1.  Delete existing toolbar while closing explorer event
>   2. Check the existing of toolbar explorer wise. Though I am setting
> myExpl to currently active  explorer, my code always returns true for
> "myExpl.CommandBars.Item(TOOLBARNAME)" whenever I open outlook folder in 
> new
> window.
>
> Thanks.
>
> === MY CODE ===
>
> Option Explicit
> Public out_appt As Outlook.Application
> Public WithEvents MyButton As Office.CommandBarButton
> Public MyCommandBar As Office.CommandBar
> Public WithEvents myColExpl As Outlook.Explorers
> Public WithEvents myExpl As Outlook.Explorer
> Private Sub AddinInstance_OnConnection(ByVal Application As Object, _
>   ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, _
>   ByVal AddInInst As Object, custom() As Variant)
>    Set out_appt = Application
> End Sub
> Private Sub AddinInstance_OnStartupComplete(custom() As Variant)
>    Set myColExpl = out_appt.Explorers
>    If out_appt.Explorers.Count > 0 Then
>        Call CreateToolBar
>    End If
>    Exit Sub
> End Sub
> Private Sub myColExpl_NewExplorer(ByVal Explorer As Outlook.Explorer)
>    If myExpl Is Nothing Then
>        Set myExpl = Explorer
>    End If
>    If out_appt.Explorers.Count > 0 Then
>        Call CreateToolBar
>    End If
> End Sub
> Private Sub myExpl_Close()
>    MyCommandBar.Delete
>    If out_appt.Explorers.Count < 1 Then
>        Set myExpl = Nothing
>        Set myColExpl = Nothing
>    End If
> End Sub
> Private Sub MyButton_Click(ByVal Ctrl As Office.CommandBarButton,
> CancelDefault As Boolean)
>    On Error Resume Next
>    MsgBox "button clicked"
> End Sub
> Private Sub CreateToolBar()
>    If out_appt.Explorers.Count = 0 Then
>        Exit Sub
>    End If
>    Set myExpl = out_appt.ActiveExplorer
>    Const TOOLBARNAME = "My Toolbar"
>
> '    Set MyCommandBar = myExpl.CommandBars.Item(TOOLBARNAME)
> '    If Not MyCommandBar Is Nothing Then
> '        MsgBox "exists"
> '        Exit Sub
> '    End If
> '
>    Set MyCommandBar = myExpl.CommandBars.Add(TOOLBARNAME, msoBarTop, 
> False,
> False)
>    Set MyButton = MyCommandBar.Controls.Add(msoControlButton, , "890", ,
> False)
>    With MyButton
>        .Caption = "&Foo Button"
>        .Enabled = True
>        .OnAction = "!<PermToolbarTesting.Connect>"
>        .Tag = "890"
>        .FaceId = 362
>        .Style = 3
>        .Visible = True
>    End With
>    MyCommandBar.Visible = True
> End Sub
> 

0
Ken
12/15/2009 3:18:18 PM
Thanks Ken but I think it is very complected way for me till I am acquainted 
with it. I am also not sure if you distinguished all explorer using objects 
then you can share the values you have loaded during startup.

I have came out with the very simple code that meets my all requirements. 
Could you please tell me if there is anything wrong? It creates the toolbar 
on new explorer event for any new Outlook window and seem to be working fine.

=== MY CODE ====

Option Explicit
Public out_App As Object
Public WithEvents MyButton As Office.CommandBarButton
Public MyCommandBar As Office.CommandBar
Public WithEvents myColExpl As Outlook.Explorers
Public WithEvents myExpl As Outlook.Explorer

Private Sub AddinInstance_OnConnection(ByVal Application As Object, ByVal 
ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As 
Object, custom() As Variant)
    Set out_App = Application
End Sub

Private Sub AddinInstance_OnDisconnection(ByVal RemoveMode _
   As AddInDesignerObjects.ext_DisconnectMode, custom() As Variant)
    Set MyButton = Nothing
    Set MyCommandBar = Nothing
End Sub

Private Sub AddinInstance_OnStartupComplete(custom() As Variant)
    Set myColExpl = out_App.Explorers
    If out_App.Explorers.Count > 0 Then
        Call CreateToolBar
    End If
End Sub

Private Sub myColExpl_NewExplorer(ByVal Explorer As Outlook.Explorer)
    If myExpl Is Nothing Then
        Set myExpl = Explorer
    End If

    If out_App.Explorers.Count > 0 Then
        Call CreateToolBar
    End If
End Sub

Private Sub myExpl_Close()
    If out_App.Explorers.Count < 1 Then
        Set myExpl = Nothing
        Set myColExpl = Nothing
    End If
End Sub

Private Sub MyButton_Click(ByVal Ctrl As Office.CommandBarButton, 
CancelDefault As Boolean)
    MsgBox "button clicked"
End Sub

Private Sub CreateToolBar()
    Dim testIt As Boolean
    If out_App.Explorers.Count = 0 Then
        Exit Sub
    End If
     
    Const TOOLBARNAME = "Permanent Toolbar Testing2"
    On Error Resume Next
    testIt = Not out_App.ActiveExplorer.CommandBars(TOOLBARNAME) Is Nothing
    If testIt Then
        Set MyCommandBar = 
Outlook.Application.ActiveExplorer.CommandBars.Item(TOOLBARNAME)
    Else
        Set MyCommandBar = 
Outlook.Application.ActiveExplorer.CommandBars.Add(TOOLBARNAME, msoBarTop, 
False, False)
    End If
        
    Set MyButton = MyCommandBar.Controls.Add(msoControlButton, , "891", , 
True)
    With MyButton
        .BeginGroup = True
        .Caption = "My Permanent Button"
        .Enabled = True
        .OnAction = "!<PermToolbarTesting2.Connect>"
        .Tag = "891"
        .FaceId = 362
        .Style = 3
        .Visible = True
    End With
    MyCommandBar.Visible = True
End Sub

Thanks,
Paresh
0
Utf
12/16/2009 3:34:02 PM
If the code you have now meets your requirements and seems to work there's 
no need for me to review it.

-- 
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"paresh" <paresh@discussions.microsoft.com> wrote in message 
news:D2E88351-298B-4D6E-8171-EFBBA163F17D@microsoft.com...
> Thanks Ken but I think it is very complected way for me till I am 
> acquainted
> with it. I am also not sure if you distinguished all explorer using 
> objects
> then you can share the values you have loaded during startup.
>
> I have came out with the very simple code that meets my all requirements.
> Could you please tell me if there is anything wrong? It creates the 
> toolbar
> on new explorer event for any new Outlook window and seem to be working 
> fine.
>
> === MY CODE ====
>
> Option Explicit
> Public out_App As Object
> Public WithEvents MyButton As Office.CommandBarButton
> Public MyCommandBar As Office.CommandBar
> Public WithEvents myColExpl As Outlook.Explorers
> Public WithEvents myExpl As Outlook.Explorer
>
> Private Sub AddinInstance_OnConnection(ByVal Application As Object, ByVal
> ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As
> Object, custom() As Variant)
>    Set out_App = Application
> End Sub
>
> Private Sub AddinInstance_OnDisconnection(ByVal RemoveMode _
>   As AddInDesignerObjects.ext_DisconnectMode, custom() As Variant)
>    Set MyButton = Nothing
>    Set MyCommandBar = Nothing
> End Sub
>
> Private Sub AddinInstance_OnStartupComplete(custom() As Variant)
>    Set myColExpl = out_App.Explorers
>    If out_App.Explorers.Count > 0 Then
>        Call CreateToolBar
>    End If
> End Sub
>
> Private Sub myColExpl_NewExplorer(ByVal Explorer As Outlook.Explorer)
>    If myExpl Is Nothing Then
>        Set myExpl = Explorer
>    End If
>
>    If out_App.Explorers.Count > 0 Then
>        Call CreateToolBar
>    End If
> End Sub
>
> Private Sub myExpl_Close()
>    If out_App.Explorers.Count < 1 Then
>        Set myExpl = Nothing
>        Set myColExpl = Nothing
>    End If
> End Sub
>
> Private Sub MyButton_Click(ByVal Ctrl As Office.CommandBarButton,
> CancelDefault As Boolean)
>    MsgBox "button clicked"
> End Sub
>
> Private Sub CreateToolBar()
>    Dim testIt As Boolean
>    If out_App.Explorers.Count = 0 Then
>        Exit Sub
>    End If
>
>    Const TOOLBARNAME = "Permanent Toolbar Testing2"
>    On Error Resume Next
>    testIt = Not out_App.ActiveExplorer.CommandBars(TOOLBARNAME) Is Nothing
>    If testIt Then
>        Set MyCommandBar =
> Outlook.Application.ActiveExplorer.CommandBars.Item(TOOLBARNAME)
>    Else
>        Set MyCommandBar =
> Outlook.Application.ActiveExplorer.CommandBars.Add(TOOLBARNAME, msoBarTop,
> False, False)
>    End If
>
>    Set MyButton = MyCommandBar.Controls.Add(msoControlButton, , "891", ,
> True)
>    With MyButton
>        .BeginGroup = True
>        .Caption = "My Permanent Button"
>        .Enabled = True
>        .OnAction = "!<PermToolbarTesting2.Connect>"
>        .Tag = "891"
>        .FaceId = 362
>        .Style = 3
>        .Visible = True
>    End With
>    MyCommandBar.Visible = True
> End Sub
>
> Thanks,
> Paresh 

0
Ken
12/16/2009 4:01:32 PM
Ken, actually I am just wondering why we have to write the very complex code 
to handle the toolbar for all opened Outlook windows individually? I 
understood your concept of generating TAG id uniquely after creating the 
explorer object but I haven't noticed multiple events firing when I have two 
Outlook window open and both have same toolbar "My Toolbar" with same Buttons 
and same TAGs.

In short, could you give me a simple example where we have to use the 
concept given by you and my code will not work? I am intermediate level in 
add-in so I might not be aware of many things.

Thanks,
Paresh

"Ken Slovak - [MVP - Outlook]" wrote:

> If the code you have now meets your requirements and seems to work there's 
> no need for me to review it.
> 
> -- 
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007.
> Reminder Manager, Extended Reminders, Attachment Options.
> http://www.slovaktech.com/products.htm
> 
> 
> "paresh" <paresh@discussions.microsoft.com> wrote in message 
> news:D2E88351-298B-4D6E-8171-EFBBA163F17D@microsoft.com...
> > Thanks Ken but I think it is very complected way for me till I am 
> > acquainted
> > with it. I am also not sure if you distinguished all explorer using 
> > objects
> > then you can share the values you have loaded during startup.
> >
> > I have came out with the very simple code that meets my all requirements.
> > Could you please tell me if there is anything wrong? It creates the 
> > toolbar
> > on new explorer event for any new Outlook window and seem to be working 
> > fine.
> >
> > === MY CODE ====
> >
> > Option Explicit
> > Public out_App As Object
> > Public WithEvents MyButton As Office.CommandBarButton
> > Public MyCommandBar As Office.CommandBar
> > Public WithEvents myColExpl As Outlook.Explorers
> > Public WithEvents myExpl As Outlook.Explorer
> >
> > Private Sub AddinInstance_OnConnection(ByVal Application As Object, ByVal
> > ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As
> > Object, custom() As Variant)
> >    Set out_App = Application
> > End Sub
> >
> > Private Sub AddinInstance_OnDisconnection(ByVal RemoveMode _
> >   As AddInDesignerObjects.ext_DisconnectMode, custom() As Variant)
> >    Set MyButton = Nothing
> >    Set MyCommandBar = Nothing
> > End Sub
> >
> > Private Sub AddinInstance_OnStartupComplete(custom() As Variant)
> >    Set myColExpl = out_App.Explorers
> >    If out_App.Explorers.Count > 0 Then
> >        Call CreateToolBar
> >    End If
> > End Sub
> >
> > Private Sub myColExpl_NewExplorer(ByVal Explorer As Outlook.Explorer)
> >    If myExpl Is Nothing Then
> >        Set myExpl = Explorer
> >    End If
> >
> >    If out_App.Explorers.Count > 0 Then
> >        Call CreateToolBar
> >    End If
> > End Sub
> >
> > Private Sub myExpl_Close()
> >    If out_App.Explorers.Count < 1 Then
> >        Set myExpl = Nothing
> >        Set myColExpl = Nothing
> >    End If
> > End Sub
> >
> > Private Sub MyButton_Click(ByVal Ctrl As Office.CommandBarButton,
> > CancelDefault As Boolean)
> >    MsgBox "button clicked"
> > End Sub
> >
> > Private Sub CreateToolBar()
> >    Dim testIt As Boolean
> >    If out_App.Explorers.Count = 0 Then
> >        Exit Sub
> >    End If
> >
> >    Const TOOLBARNAME = "Permanent Toolbar Testing2"
> >    On Error Resume Next
> >    testIt = Not out_App.ActiveExplorer.CommandBars(TOOLBARNAME) Is Nothing
> >    If testIt Then
> >        Set MyCommandBar =
> > Outlook.Application.ActiveExplorer.CommandBars.Item(TOOLBARNAME)
> >    Else
> >        Set MyCommandBar =
> > Outlook.Application.ActiveExplorer.CommandBars.Add(TOOLBARNAME, msoBarTop,
> > False, False)
> >    End If
> >
> >    Set MyButton = MyCommandBar.Controls.Add(msoControlButton, , "891", ,
> > True)
> >    With MyButton
> >        .BeginGroup = True
> >        .Caption = "My Permanent Button"
> >        .Enabled = True
> >        .OnAction = "!<PermToolbarTesting2.Connect>"
> >        .Tag = "891"
> >        .FaceId = 362
> >        .Style = 3
> >        .Visible = True
> >    End With
> >    MyCommandBar.Visible = True
> > End Sub
> >
> > Thanks,
> > Paresh 
> 
> .
> 
0
Utf
12/16/2009 5:59:01 PM
Here's one example.

You have a toggle button that indicates a state for doing something. If you 
have 2 Inspectors open and both use the same Tag value for a 
CommandBarButton, both will get the click event that toggles the button. So 
toggling in one toggles both. Then when some action is taken based on the 
button state you can't maintain separate states for the button in each 
Inspector.

Using wrapper classes solves a number of problems such as that with unique 
Tag values, individually handling events in multiple open windows, handling 
discrete ribbon clicks that are directed to only one Inspector where you 
pass the click to a handler in your wrapper class, etc.

Every advanced Outlook developer I know uses wrapper classes and 
collections, but your mileage may vary. I'd never do an Outlook addin myself 
without wrapper classes.

-- 
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"paresh" <paresh@discussions.microsoft.com> wrote in message 
news:2E9E6C5E-720E-45C2-8264-FE17747B909B@microsoft.com...
> Ken, actually I am just wondering why we have to write the very complex 
> code
> to handle the toolbar for all opened Outlook windows individually? I
> understood your concept of generating TAG id uniquely after creating the
> explorer object but I haven't noticed multiple events firing when I have 
> two
> Outlook window open and both have same toolbar "My Toolbar" with same 
> Buttons
> and same TAGs.
>
> In short, could you give me a simple example where we have to use the
> concept given by you and my code will not work? I am intermediate level in
> add-in so I might not be aware of many things.
>
> Thanks,
> Paresh

0
Ken
12/16/2009 6:42:02 PM
Thanks that makes perfect sense to me but I think I don't need to write 
wrapper class for explorer as my requirements are very simple and nothing is 
shared between the toolbar clicks that might cause the issue.

What all I want is to put toolbar whenever new explorer open and perform the 
operation when button click.

Thanks a lot for your help.
Paresh

"Ken Slovak - [MVP - Outlook]" wrote:

> Here's one example.
> 
> You have a toggle button that indicates a state for doing something. If you 
> have 2 Inspectors open and both use the same Tag value for a 
> CommandBarButton, both will get the click event that toggles the button. So 
> toggling in one toggles both. Then when some action is taken based on the 
> button state you can't maintain separate states for the button in each 
> Inspector.
> 
> Using wrapper classes solves a number of problems such as that with unique 
> Tag values, individually handling events in multiple open windows, handling 
> discrete ribbon clicks that are directed to only one Inspector where you 
> pass the click to a handler in your wrapper class, etc.
> 
> Every advanced Outlook developer I know uses wrapper classes and 
> collections, but your mileage may vary. I'd never do an Outlook addin myself 
> without wrapper classes.
> 
> -- 
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007.
> Reminder Manager, Extended Reminders, Attachment Options.
> http://www.slovaktech.com/products.htm
> 
> 
> "paresh" <paresh@discussions.microsoft.com> wrote in message 
> news:2E9E6C5E-720E-45C2-8264-FE17747B909B@microsoft.com...
> > Ken, actually I am just wondering why we have to write the very complex 
> > code
> > to handle the toolbar for all opened Outlook windows individually? I
> > understood your concept of generating TAG id uniquely after creating the
> > explorer object but I haven't noticed multiple events firing when I have 
> > two
> > Outlook window open and both have same toolbar "My Toolbar" with same 
> > Buttons
> > and same TAGs.
> >
> > In short, could you give me a simple example where we have to use the
> > concept given by you and my code will not work? I am intermediate level in
> > add-in so I might not be aware of many things.
> >
> > Thanks,
> > Paresh
> 
> .
> 
0
Utf
12/17/2009 4:39:01 AM
Reply:

Similar Artilces:

Outlook Web Access attachment problem
We have a program that will generate a .snp file and then email it to whatever recipient it needs to go to. If they receive the email in Outlook it will allow them to open the file properly with the Snapshot viewer. However, if they go to the same email in OWA and try to save the attachment, it attempts to save it as an .mdb file. Why would OWA ignore the original extension and try to give it a different one? "Joe Giddings" <j_nospam_giddings@thehammocksource.com> wrote in news:jI9gd.11726$ta5.6952@newsread3.news.atl.earthlink.net: > We have a program that will genera...

mail sending problem
Hi , I am very new in the exchange server just now I have deployed Microsoft Exchange Server 2003 at my organization now i have some problem in that . I am able to send mail outside the domain except yahoo .whenever I am sending mail from my exchange mail id to any yahoo mail id it is showing me mail has been sent but on yahoo id it is not delivering even I am not getting the DFR, second I wants to know that can we take the backup of single mail box (boxs) and please tell me step by step how can we take backup (at least the location ) Thanks in Advance Madi The most probable reason is t...

Customize Toolbar corrupted
When I try to customize the toolbar so that I can integrate Outlook Express newsreader in Outlook the "New" button does not appear in Command under "Go". I tried several things: a) repair b) reinstall c) uninstall and reinstall Still nothing works. How can I uninstall completely and star all over again. Or if I knew what file or dll is used I may be able to copy one from another computer. IF You are not looking in the right place place for "News" - I assume that's what you mean by "New" in your post. In Outlook try this, right click on th...

Windows Welcome Screen Login Looping Problem
Up until now no startup problems whatsoever with my system. Today, I press the start button and it boots fine to the Windows' Welcome Screen. When I click on my account icon (no password ever entered) it tries to login (I see my desktop for about 4-5 seconds) but it comes back to the same Windows' Welcome Screen after about 5-10 seconds. My significant other also has an account icon and when she tries to login from the welcome screen she can't get pass the screen either and gets the same 5-10 seconds looping problem that happens to me. System specs: Dell Deminsio...

Incoming mail server problem
I use supanet for the internet and recently had to clear off a load of viruses and worms from my computer. Computer is clean now. I've run up to date spybot. adaware and cleaned all viruses with Mcaffee internet security as well as running stinger. Sasser, and W32 pate.b were included. Have also completed all windows updates. Everything is working fine now except my email. When I restart the computer my incoming mail server keeps changing from pop.supanet.com to a strange number. 9eg 17.02.01.10 or something similar) It also changes the user name from 3612 to 3612@supanet.com (It adds su...

Problems performing a restore to a SAN drive
We recently move our message stores to SAN. I've tried to perform a restore to a recovery storage group on the SAN and am not able to do it. We use Ultrabac as our backup application, but I've tried NTBackup also and am getting the following errors in the App logs: Information Store (3576) Callback function call ErrESECBRestoreGetDestination ended with error 0xC7FE1F42 Database not found. and Failed to find a database to restore to from the Microsoft Active Directory. Storage Group specified on the backup media is e0d4e0af-f91a-490d-9b40-47e27b9fb714. Database speci...

XMLA .NET connection problem
Hi, After install msxml 4.0 and XMLASDK 1.1, i proceed to configure the datasource.xml file, as follow: <DataSource> <DataSourceName>FoodMart 2000</DataSourceName> <DataSourceDescription>Microsoft Analysis Server 2000 on local machine</DataSourceDescription> <URL>http://localhost/xmla/msxisapi.dll</URL> <DataSourceInfo>Provider=MSOLAP.2;Data Source=md001144</DataSourceInfo> <ProviderName>Microsoft XML for Analysis</ProviderName> <ProviderType> <TDP/> <MDP/> <DMP/> </ProviderType>...

Add items from an external application to RMS transaction grid
Is there a way to add items from an external application to MS RMS transaction grid? I want to add items using windows application or web application to RMS transaction grid. Kindly help how to add from an external application. Thanks for help in advance. You would need an Add-in for RMS to make this happen. If you are yourself not sure how to make this happen, I would consult with your RMS partner, or any of the other partners on this forum, including my company, that specialize in creating customization for RMS. If you are interested in getting an estimate for this work please f...

Problems with DATE data type
Hi!!! I've got a little problem with the next macro in Excel. The problem is that I must look for some information in a data bas using as filter a specific day an hour in the year. I get the date and the hour using a form and then the macro calle "Busqueda" receives the value. I've programmed the macro using MSQuery just to see the necessary cod and the problem has appeared when I've tried to include the para called "Dia" in the SQL code. I've tried using " & Dia & " but it doesn't work and I don't know ho to include my param...

Publisher 2003
I'm attempting to print a calendar and I keep getting the message, "Cannot load the printer driver." I have no idea what that means other than I'm unable to print my calendar. Anyone have any ideas? I get the same message whenever I try to print a card I've created. HELP! -- The computer has been chucked out the picture window and the birds are nesting in it. *sigh* Merrie wrote: > I'm attempting to print a calendar and I keep getting the message, > "Cannot load the printer driver." I have no idea what that means > other than I'm una...

Reinstall problem
I have a CRM 1.2 MSDN installation. I ran add/remove programs to un-install. Everything seemed to uninstall just fine. I then ran the installer again to reinstall. I wanted to use the existing database. I select the: "Connect to an existing database" options, click next then select my SQL server from the list. I then get a message: Setup could not find any valid Microsoft CRM databases on the server you have specified. You must select a different server. I know the databases are there. I can see them in enterprise manager. The system was working fine except for ...

? types as an ampersand E
Why and how can I fix this? It happens sometimes, not all the time. Thanks. Based on the information you provided, I would guess that your keyboard is malfunctioning. The problem might be very different from that guess, but there is not much information provided. "Moberly" <Moberly@discussions.microsoft.com> wrote in message news:A5ED966F-ADF5-48A0-A2A3-7F1998C5922B@microsoft.com... > Why and how can I fix this? It happens sometimes, not all the time. > Thanks. ...

Problem w/ Task Manager
This is a multi-part message in MIME format. ------=_NextPart_000_0006_01CB4835.4C042E00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am running a laptop with WIndows XP SP3. I am not sure what changed or = happened but my task manager now only shows the processes tab. The tabs = are mising for me to change views as well as the title bar for my task = manager windo and the menu bar i also gone. How can I correct it? Thanks ------=_NextPart_000_0006_01CB4835.4C042E00 Content-Type: text/html; charset="iso-8...

Which type of digital certificate to get from VeriSign for SignedXML
Hi all, Happy New Year. I am using SignedXML and an X509 certificate to digitally sign a SOAP message body and put the signature in the SOAP header for a B2B business application. Can you suggest which type of digital certificates from VeriSign is for this purpose? I checked VeriSign's web site but didn't find it obvious to decide. Thank you very much for your help. --- Guangxi Hi Guangxi, What about the Secure Site Services? SSL certificates are ideal for securing Web sites, intranets and extranets. It's cheap and guarantee every SSL session will receive powerful SSL enc...

CRM API: Converting an Object Type value -> ObjectType
I've setup post callouts in CRM which notify me when a CRM object has been modified. CRM sends me the ObjectType value so I know what type of object has been modified. For example 1 for an Account, 132 for an Activity... I can't figure out however how to convert the number back into an ObjectType. In theory it should be very simple, but from what I can tell the ObjectType class is NOT an Enum, oddly enough. I've tried the following: int objectTypeValue = 2; // which is a Contact // returns otActivity test = (ObjectType) Enum.ToObject(typeof(ObjectType), objectTypeValue); // r...

Mac problems opening excel files when connected to two windows shares
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel I'm noticing a strange problem when I try to open excel files when I connect to a second windows server share. I'm getting a cannot open excel file error. Not sitting at my work mac computer at the moment so not quite sure that was the exact error. <br><br>This error is occuring on both leopard and snow leopard with Office 2008 for mac. <br><br>The two windows servers are being connected to by smb://server1/common and smb://server2/common. <br><br>If i connect to each one i...

An error number : 424 problem
I'm having trouble with an attachment field. On a report I can see the picture and the filename of the selected attachent properly. Now in a SQL UPDATE string that i'm making I always get the error 424 Object required. Here is the line where it happens : 'mySQL = mySQL + ", scan_g = " & prn_du_pied_g.FileName scan_g is a Text field prn_du_pied_g is an attachment All I want to do is to use the filename of the attchment. How do I solve this Thank you for the help -- Eric "ericb" <eric@b.com> wrote in message news:9A...

SQL 2005 Express
The New SQL Server Management Studio Express (that comes with SQL 2005 Express) is excellent and a huge improvement over MSDE tools we've had to use in the past. However, the lack of an import tool (SQL Server Integration Services) limits our capabilities with larger RMS customers who need, for example, to update thousands of item costs throughout the year. SSIS Express or at least an Import feature would help us create a 'dynamic' (yes, I said it) solution for our customers. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestio...

What is this window type ?
Hi there, I couldn't find any info on google about this because I don't even know how you call that type of window. It's pretty basic, I have my active window and I want to use a second window but still be able to use the first one. When I create a dialog using the DoModal() I can't give control back to my main window... Can someone maybe only point out the type of window it is so I can check some info on the net how to use them ? Thanks, Max. Maxime Savard wrote: > Hi there, > > I couldn't find any info on google about this because I don't ...

Mail and Catalog merge problems
This is a two part question. The first part concerns an error and the second part is seeking advice. First the error: I am trying to create a data source for use in a catalog merge. No matter what method I use, even using "Create Address List" from Publisher's Tools menu, I get an error dialog saying: "The operation cannot be completed because of dialog or database engine failures. Please try again later." What causes this and how do I correct it? I would like to be able to connect to a SQL 2005 database for merge data. Now the request for advice: I am cr...

Publisher 2007 printing problem
I have a publisher file 6x4 template. When I try to print on a 4x6 photo paper instead of 1 page landscape it prints 2 in portrait. No mater what I do seems to change this. First, File Print setup Size: 4x6 Portrait OK Then, File Page Setup Special Size Width: 6" Height: 4" Landscape OK Build your project Save File Print -- Don - Publisher 2000� Vancouver, USA "tomincolorado" <tomincolorado@discussions.microsoft.com> wrote in message news:7CC2310B-E932-459A-94A2-45E96D530FC7@microsoft.com... >I have a publisher file 6x4 ...

problem with Corrupt pst file
I have a problem with a corrupt? pst file. cannot download mail, cannot delete mail in the folders Tried to run the scanpst.exe, gave an error first, did do some repair, still the same problem, tried again, said the file is fine. Did repair office (2003) no difference, restoring a backup pst, works fine (only the backup is one month old) I imported the corrupted pst file as a second "personal folders" for viewing but cannot move the e-mails from the corrupt to the backup = now main pst file Are there any other tools/utilities to check/restore the pst file? Thanks for your help...

CAsyncSocket::Reveive() problem
I am receiving some data in my application through the Receive() function TCHAR data[100]; int read=serv1.Receive(data,100); so here the data received in the data buffer is always half the data sent from the other side like if i send "AAAAAAAA" then i receive only "AAAA" which is half of the sent. what is the problem? "nexolite" <nexolite@discussions.microsoft.com> wrote in message news:47AD1B40-9CBD-4BC1-B196-B2A26EA1C908@microsoft.com... >I am receiving some data in my application through the Receive() function > > TCHAR data[100]; > ...

After crash problem
Hello, We've just recovered our crashed exchange 2003 server. All is working fine except for one user that keeps on getting prompted to enter his domain user name and password. Even when the information is entered, the user still does not get access to her inbox folder which resides in the server. The user has no problem accessing her email using OWA. Any ideas> Thank you in advance. Check the following things: Outlook repeatedly prompting for credentials - First possibility was primary DNS suffix on either the client or the server being wrong - make sure it matches the DNS ...

How can I add multiple source data data labels?
To be more exact, I require my original data labels (in an Area Chart in Excel) to remain visible, ie £250,444; in addition I require to show on the same drop line, either above or below this original figure, the Loan To Value amount, ie 48%. I am sure this is possible, however I am unable to discover the correct process to enable this eventuality. Hi, First you need to create a concatenated formula in the spreadsheet, then you need to use a custom add-in to use those cells a data labels. Assume you 250,444 is in column B and the 48% is in column C then in column D enter thr...