![]() ![]() Redemption.SafeInspector sInspector = new Redemption.SafeInspector() In C#, it would be something like the following (assuming you added Redemption to your project references): //simulate a click on the "Assign Task" button of an active Inspector ![]() Ribbon.ActiveTab = oldActiveTab 'restore the active tabĮDIT. Set Control = Ribbon.Controls("Assign Task") SInspector.Item = Application.ActiveInspector Set sInspector = CreateObject("Redemption.SafeInspector") You can try to use Redemption and its SafeRibbon object: 'simulate a click on the "Assign Task" button of an active Inspector So the question is: Is there a way to programmatically "click" on a ribbon button? If not, is there another way to cancel the task assignment the way the ribbon button does it? With Outlook 2013, Microsoft has finally removed this object. The CommandBarButton object still existed programmatically, though, for backward compatibility. That's not surprising since Inspector command bars were replaced by the Ribbon in 2007. However, in Outlook 2013, this command bar button no longer exists. In Outlook 20, we can get the CommandBarButton object for the Cancel Assignment button and call its Execute() method. ![]() The Assign Task button on the ribbon is disabled. Although it does cancel the assignment, it also leaves the task in an unassignable state. One would think that calling TaskItem.CancelResponseState() might work. We need to programmatically cancel a task assignment in the TaskItem Inspector window, just the way the Cancel Assignment button does. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |