Why doesn't this work? 
Author Message
 Why doesn't this work?

Hi, can anyone tell me why this doesn't work? What I want to happen is that when
someone is, for example, in the outbox, and they open up, for example, the inbox,
this event should be triggered and create(if doesn't exist) the button.
Here is the code:

Private Sub goExplorers_NewExplorer(ByVal Explorer As Outlook.Explorer)

    On Error Resume Next

    Dim oBar As Office.CommandBar
    Set oBar = Explorer.CommandBars("Standard")
    Set goButton = oBar.FindControl(Type:=msoControlButton, ID:=oBar.Controls
("Data").ID)

    If goButton Is Nothing Then
        Set goButton = oBar.Controls.Add(1)
        goButton.Caption = "Data"
    End If

    goButton.Visible = True

End Sub

Thanx, Sara



Sat, 01 Nov 2003 22:40:16 GMT  
 Why doesn't this work?
This event will only fire if you right click on a folder and select "Open in new
window", otherwise the explorer is still the same. Wouldn't
Explorer.BeforeFolderSwitch and Explorer.FolderSwitch events be better suited
for your needs?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool


Hi, can anyone tell me why this doesn't work? What I want to happen is that when
someone is, for example, in the outbox, and they open up, for example, the
inbox,
this event should be triggered and create(if doesn't exist) the button.
Here is the code:

Private Sub goExplorers_NewExplorer(ByVal Explorer As Outlook.Explorer)

    On Error Resume Next

    Dim oBar As Office.CommandBar
    Set oBar = Explorer.CommandBars("Standard")
    Set goButton = oBar.FindControl(Type:=msoControlButton, ID:=oBar.Controls
("Data").ID)

    If goButton Is Nothing Then
        Set goButton = oBar.Controls.Add(1)
        goButton.Caption = "Data"
    End If

    goButton.Visible = True

End Sub

Thanx, Sara



Sun, 02 Nov 2003 00:48:23 GMT  
 Why doesn't this work?
Thank you, thank you, thank you!
That's what I've been trying to get at, asking you about how the explorer works
etc etc.
Now that I know that these events even exist, and I understand how the explorer
works, I can actually get this to work!

Thanx again(that should be # 4 now!)
Sara

Quote:
-----Original Message-----

This event will only fire if you right click on a folder and select "Open in new
window", otherwise the explorer is still the same. Wouldn't
Explorer.BeforeFolderSwitch and Explorer.FolderSwitch events be better suited
for your needs?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool



Hi, can anyone tell me why this doesn't work? What I want to happen is that when
someone is, for example, in the outbox, and they open up, for example, the
inbox,
this event should be triggered and create(if doesn't exist) the button.
Here is the code:

Private Sub goExplorers_NewExplorer(ByVal Explorer As Outlook.Explorer)

    On Error Resume Next

    Dim oBar As Office.CommandBar
    Set oBar = Explorer.CommandBars("Standard")
    Set goButton = oBar.FindControl(Type:=msoControlButton, ID:=oBar.Controls
("Data").ID)

    If goButton Is Nothing Then
        Set goButton = oBar.Controls.Add(1)
        goButton.Caption = "Data"
    End If

    goButton.Visible = True

End Sub

Thanx, Sara

.



Sun, 02 Nov 2003 02:26:14 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Why oh why doesn't this work?

2. Why doesn't this work?

3. Why doesn't this work???

4. Why doesn't this work?!!

5. why doesn't it work?????

6. Why doesn't this work?

7. Why doesn't this work anymore?

8. threading and why doesn't it work!!!! :)

9. Itemop.Navigate - Why doesn't it work?!

10. Why doesn't this work

11. Why doesn't it work?

12. Help needed !! Why doesn't this work

 

 
Powered by phpBB® Forum Software