
Changes in the Item.GetInspector.CommandBars from Outlook 2000 to Outlook XP
Hello there!!
One year ago, i developed one add-in that attached a message to a email when
the user send a sign email.
This was developed to Outlook 2000 using VB6.
The source code is this:
Private Sub oOutlook_ItemSend(ByVal Item As Object, Cancel As Boolean)
If Not Item Is Nothing Then
If Item.Class = olMail Then
Dim oDigSign
Dim oCBs
Dim Assinado As Boolean
Dim oDigSignCtl
Assinado = False
Set oDigSignCtl = Item.GetInspector.CommandBars.FindControl(,
719)
If oDigSignCtl Is Nothing Then
Set oCBs = Item.GetInspector.CommandBars
Set oDigSignCtl = oCBs.Item("Standard").Controls.Add(, 719,
, , True)
End If
If oDigSignCtl.Enabled = True Then
If oDigSignCtl.State = 0 Then
Assinado = False
Else
Assinado = True
End If
Else
Assinado = False
End If
Set oCBs = Nothing
Set oDigSignCtl = Nothing
If Assinado Then
Item.Body = Item.Body & vbCrLf & vbCrLf & vbCrLf & vbCrLf &
_
"My text here!!!!"
End If
End If
End If
End Sub
When i run it, the
Set oDigSignCtl = Item.GetInspector.CommandBars.FindControl(, 719)
it returns me an error with :
Run-time error '-2147417848 (80010108)'
Method '~' of object '~' failed
I suppose this method is no longer avaible on the Office XP.
Can you help me with this????
Thanks!!!
Jo?o Ramos