Word COM-Addin is not to be loaded into Outlook

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.
 
O

Oliver Scheiber

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


*** Sent via Developersdex http://www.developersdex.com ***
 

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