Word COM-Addin is not to be loaded into Outlook

  • Thread starter Thread starter Oliver Scheiber
  • Start date Start date
O

Oliver Scheiber

Hi,
i have developed an Word-XP COM-AddIn using visual basic 6.0 and it
works fine.

Now i would like to load my word-addin only into word and not outlook.

Every time i do mails in outlook I see the commanbar(com-addin).

How does not load in outlook?

I tried this code in my designer but nothing is do:

Public WithEvents OutApp As Outlook.Application

Private Sub OutApp_Startup()
Dim objcb As Office.CommandBar

For Each objcb In CommandBars
If objcb.Name = "KorrAssistent" Then
objcb.Visible = False
Exit For
End If
Next
End Sub

Any suggestion?

Regards Oliver.
 
Hi Michael,
yes i have and now it works. Now found the correct word-event.

Code:

Private Sub oApp_WindowActivate(ByVal Doc As Word.Document, ByVal Wn As
Word.Window)
Dim objcb As Office.CommandBar
For Each objcb In CommandBars
If objcb.Name = "KorrAssistent" Then
If Wn.EnvelopeVisible = True Then
objcb.Visible = False
Exit For
End If
End If
Next
End Sub


Thanx.

Best regards
Oliver
 
Back
Top