EnableTrustedBrowser Property

Microsoft Office Visual Basic

EnableTrustedBrowser Property

Returns or sets the option that allows a user to view a document with restricted permissions in a web browser if the user does not have the appropriate client application installed. Read/write Boolean. Default is False.

expression.EnableTrustedBrowser

expression    Required. An expression that returns a Permission object.

Remarks

The EnableTrustedBrowser property, when True, allows a user who tries to open a Office Word 2003 document with restricted permissions, for example, but who does not have the Office Word 2003 application installed, to view the document in Microsoft Internet Explorer or another browser that supports this functionality. This property corresponds to the checkbox Allow users with earlier versions of Office to read with browsers supporting Information Rights Management. (Increases file size.) in the user interface.

Example

The following example reports whether the active document has restricted permissions and, if so, whether the EnableTrustedBrowser property is also enabled.

        Dim irmPermission As Office.Permission
    Set irmPermission = ActiveWorkbook.Permission
    Select Case irmPermission.Enabled
        Case True
            Select Case irmPermission.EnableTrustedBrowser
                Case True
                    MsgBox "Permissions are restricted on this document." & _
                        vbCrLf & "Viewing in trusted browser is also enabled.", _
                        vbInformation + vbOKOnly, "IRM Information"
                Case False
                    MsgBox "Permissions are restricted on this document." & _
                        vbCrLf & "However, viewing in trusted browser is disabled.", _
                            vbInformation + vbOKOnly, "IRM Information"
            End Select
        Case False
            MsgBox "Permissions are NOT restricted on this document.", _
                vbInformation + vbOKOnly, "IRM Information"
    End Select
    Set irmPermission = Nothing