Quantcast
Channel: NetOffice - MS Office in .NET
Viewing all articles
Browse latest Browse all 1741

New Post: Show Ribbon-Tab only in Main-Window (Outlook Addin)

$
0
0
Hi Sebastian

You brought me to the right path!

At the end I solved it a bit different:
Public Function getVisible(ByVal control As Office.IRibbonControl) As Boolean
        Try
            Dim objOutlook As Outlook._Application
            Dim myInspector As Outlook.Inspector
            objOutlook = New Outlook.Application()
            myInspector = objOutlook.ActiveInspector

            'Show only if TypeName is nothing (Outlook Main Window)
            If TypeName(myInspector) = "Nothing" Then
                Return True
            Else
                Return False
            End If

        Catch ex As Exception
            MsgBox(ex.Message, vbCritical)
            Return False
        End Try
    End Function

Viewing all articles
Browse latest Browse all 1741

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>