Inspector doesn't change Save-Button to Send-Button when adding recipients via VB

Joined
Jan 11, 2008
Messages
3
Reaction score
0
Hello there,

I work on a VB6-Addin for OL2003 that allows a user to quickly add a special group of recipients to an appointment by simply dblclicking them in a custom form.

My origional code looked like that:

Code:
Private Sub RoomSel_Auswahlliste_DblClick()
Dim myRoom As outlook.Recipient
Set myRoom = myOlInspector.CurrentItem.Recipients.Add( RoomSelector.AuswahlListe.List( RoomSelector.AuswahlListe.ListIndex ) )
myRoom.Type = olResource
myRoom.Resolve
RoomSelector.Hide
End Sub

When adding recipients "by hand" Outlook changes the "Save and Close"-Button to a "Send"-Button. But in that case it somehow doesn't get noticed of the change and nothing happens.

Since I couldn't find out, how to trigger that change, I tried the following approach by adding two new lines:

Code:
Private Sub RoomSel_Auswahlliste_DblClick()
Dim myRoom As outlook.Recipient
Set myRoom = myOlInspector.CurrentItem.Recipients.Add( RoomSelector.AuswahlListe.List( RoomSelector.AuswahlListe.ListIndex ) )
myRoom.Type = olResource
myRoom.Resolve
RoomSelector.Hide
 
[b]myOlInspector.CommandBars.FindControl( msoControlButton, 2617 ).Visible = True[/b]
[b]myOlInspector.CommandBars.FindControl( msoControlButton, 1975 ).Visible = False[/b]
End Sub

This worked fine until today. Now Outlook throws an object error.

By looping over the commandbars contents I found out, that Button 2617 is now missing (not just visible=false) and does not appear until I add a recipient by hand.

So now I'm stuck with that.

Thanks in advance for any help - and please excuse my poor english

Harry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top