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:
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:
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
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