简体   繁体   中英

Toggle a customized button in the New Mail Message Ribbon within Outlook 2010

I have created a new customized button that sets the Sensitivity to Confidential.

I would like the button to be able to do the following:

  1. Toggle the setting each time the button is pressed (sets and unsets the confidential tag).
  2. Be highlighted when the sensitivity setting is currently set to Confidential (similiar behavior to setting the 'high importance' tag.

.

Sub setConfidential()

ActiveInspector.CurrentItem.Sensitivity = olConfidential

End Sub

Re: Toggle the setting each time the button is pressed (sets and unsets the confidential tag).

Sub ToggleSensitivity()
    if ActiveInspector.CurrentItem.Sensitivity = olConfidential then
        ActiveInspector.CurrentItem.Sensitivity = olNormal
    else
        ActiveInspector.CurrentItem.Sensitivity = olConfidential
    end if
End Sub

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM