Changes in the Item.GetInspector.CommandBars from Outlook 2000 to Outlook XP 
Author Message
 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



Fri, 03 Jun 2005 00:53:08 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. form of outlook xp to outlook 2000 sp3

2. VBA in Outlook XP Vs Outlook 2000.

3. Outlook 2000 or Outlook XP banner in startup box

4. E-mail security in Outlook 2000/XP blocks normal application development

5. Replacing message body text in Outlook 2000 7 XP

6. Outlook 2000/XP VB Addin security

7. outlook 2000 within windows xp

8. Outlook 2000 > XP plugin using VB

9. Always BCC in Outlook 2000/2002/XP

10. Purge IMAP in Outlook 2000/XP automatically on Exit

11. Adding Outlook 2000/XP Inspector-level functionality?

12. Item.Display problem with outlook 2000

 

 
Powered by phpBB® Forum Software