none
How to customize view of Outlook To-Do bar task list and task peek with VSTO or VBA? RRS feed

  • Question

  • I'm developping a Outlook Addin with VSTO.In the development process,I has encountered a problem:

    How to customize view of Outlook To-Do bar task list  and task peek with VSTO or VBA?

    Control and customize task folder' view is no problem with VSTO or VBA,but customize view of Outlook To-Do bar task list or task peek  is very hard.

    Could anybody give me some tips or directions on it?

    Thanks very much!

    Wednesday, September 27, 2017 3:16 AM

Answers

  • Hi MYN,

    Thanks for more information.

    >> When you change the standard view of to-do list folder(for example,"To-Do List" View),a cached viewthe customized view will be createdand it would not be applied to To-Do bar task pane at the same time

    As you found, after changing To-Do List Folder view, the To-Do Bar will not change. This is because that they are two different objects, and they are not using the same view.

    For To-Do List view, it is Folder view, but for To-Do bar view, it is Explorer Pane.

    >> How to get the cached "To-Do List" view of to-do list folder programmatically and apply it to To-Do bar task pane at the same time?

    We could access To-Do List view as the code from Celeste, but we could not access To-Do bar.

    In a summary, it is impossible to custom To-Do Bar.

    Best Regards,

    Edward 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by MYN Pro Tuesday, October 17, 2017 12:35 PM
    Tuesday, October 17, 2017 7:15 AM

All replies

  • Hello,

    You need to use the CurrentView property of the Explorer or Folder class which returns View object representing the current view. To obtain a View object for the view of the current Explorer , use Explorer.CurrentView instead of the CurrentView property of the current Folder object returned by Explorer.CurrentFolder .

    The View object allows you to create customizable views that allow you to better sort, group and ultimately view data of all different types. There are a variety of different view types that provide the flexibility needed to create and maintain your important data.

    • The table view type (olTableView) allows you to view data in a simple field-based table.

    • The Calendar view type (olCalendarView) allows you to view data in a calendar format.

    • The card view type (olCardView) allows you to view data in a series of cards. Each card displays the information contained by the item and can be sorted.

    • The icon view type (olIconView) allows you to view data as icons, similar to a Windows folder or explorer.

    • The timeline view type (olTimelineView) allows you to view data as it is received in a customizable linear time line.

    Views are defined and customized using the View object's XML property. The XML property allows you to create and set a customized XML schema that defines the various features of a view.

    To determine how the XML should be structured when creating views, you can create a view by using the Outlook user interface and then you can retrieve the XML property for that view.


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Wednesday, September 27, 2017 6:33 PM
  • Thank you for your reply!

    But I want to customize the view of To-Do Bar task list and Task peek, rather than other task folder.

    If you can succeed,could you put some sample code here? Thanks!

    Friday, September 29, 2017 1:39 AM
  • Hi MYN,

    Could you share us a screen shot about where you want to custom?

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, October 2, 2017 7:49 AM
  • Just View of To-Do Bar task list(open by clicking 【View】->【To Do Bar】->【Task】), I cannot  upload or insert screen shot,sorry。
    Tuesday, October 10, 2017 7:14 AM
  • Hello,

    I think it is impossible to customize the To-Do-Bar task pane.

    To customize fluent UI, normally, we could use Office Open XML Formats files that contain XML markup, or use COM add-ins that contain XML markup. However, it doesn't support customize built-in task pane in Office.

    I also follow Eugene's suggestion to check its XML, but the XML is not related to the task pane started by To-Do-Bar.

    To work around, I think you need to create custom task pane to list the task. The following links might be helpful:

    Custom Task Panes

    Outlook "To-Do List" folder. Get items for all accounts

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, October 12, 2017 1:49 AM
    Moderator
  • Thanks!I just have a question:

    Why can user customize the view of To-Do Bar task list manually through UI,but not through the program?

    Thursday, October 12, 2017 10:41 AM
  • How do you manually customize the view of To Do Bar task? How do you want to programmatically customize? 

    Do you mean Change the size or contents of the To-Do Bar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, October 13, 2017 1:24 AM
    Moderator
  • Right-click anywhere on the To-Do Bar task list header bar (the bar with the heading Arrange By, or Task Subject on it). From the shortcut menu that pops open, choose View Settings.There we can manually customize the view of To Do Bar task list。

    And I want to programmatically customize the View of To-Do Bar task list.Thanks.

    • Edited by MYN Pro Friday, October 13, 2017 5:06 AM
    Friday, October 13, 2017 5:04 AM
  • Hello,

    Outlook 2016 removes the view settings in the context menu of the pane. We have to go to View tab, click Change View and right-click "To-Do List". The changes would be applied to view in Task explorer and the task pane( which opened by View -> To Do Bar -> Task) at the same time. 

    The view settings you are referring are still in Outlook 2013/2010. We could open it by right clicking on To-Do Bar task pane. However, the changes would not be applied to explorer and task pane at the same time. 

    We could the following code to get the "To-Do List" view object which refers to View tab -> View settings, but we could not get the view settings of ToDoBar task pane.

     Set objName = Application.GetNamespace("MAPI")
     Set objViews = objName.GetDefaultFolder(olFolderToDo).Views
     Set objView = objViews("To-Do List")

    If you are using Outlook 2013/2010, you could use Application.ActiveExplorer.ShowPane olToDoBar, True  to show the ToDoBar task pane, but this variable has been removed in Outlook 2016. Please visit OlPane Enumeration (Outlook)

    So, according to my test result, in Outlook 2016, we could change the view, but we are unable to open the pane programmatically. 

    In Outlook 2013/2010, we could open the task pane programmatically, but Outlook Object Model doesn't provide any method to access the View and change the settings. 

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, October 13, 2017 9:06 AM
    Moderator
  • Thanks for your reply!

    But Whenever you changes the settings for one of the standard views while viewing a folder, Outlook caches a folder-specific copy of the view as a StorageItem in that folder. When you change the standard view of to-do list folder(for example,"To-Do List" View),a cached view(the customized view) will be created,and it would not be applied to To-Do bar task pane at the same time.

    by the way ,Outlook 2016 still have the view settings in the context menu of the to-do bar task pane.

    So,The question is:

    How to get the cached "To-Do List" view of to-do list folder programmatically and apply it to To-Do bar task pane at the same time?

    Or, Is there any method to access the View and Change the setting of To-Do bar task pane not through Outlook Object Model,for example through API?

    Thanks!


    • Edited by MYN Pro Monday, October 16, 2017 3:02 PM
    Monday, October 16, 2017 1:53 PM
  • Hi MYN,

    Thanks for more information.

    >> When you change the standard view of to-do list folder(for example,"To-Do List" View),a cached viewthe customized view will be createdand it would not be applied to To-Do bar task pane at the same time

    As you found, after changing To-Do List Folder view, the To-Do Bar will not change. This is because that they are two different objects, and they are not using the same view.

    For To-Do List view, it is Folder view, but for To-Do bar view, it is Explorer Pane.

    >> How to get the cached "To-Do List" view of to-do list folder programmatically and apply it to To-Do bar task pane at the same time?

    We could access To-Do List view as the code from Celeste, but we could not access To-Do bar.

    In a summary, it is impossible to custom To-Do Bar.

    Best Regards,

    Edward 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by MYN Pro Tuesday, October 17, 2017 12:35 PM
    Tuesday, October 17, 2017 7:15 AM
  • Very regret !

    Thanks for your reply and time!!

    Tuesday, October 17, 2017 12:37 PM
  • Very regret !

    Thanks for your reply and time!!

    I agree, MYN Pro. Why was the To-Do Peek customizable in previous versions of Outlook, but no longer in 2016? This is absolutely key to productivity!

    Would one work-around be to revert to Outlook 2013 or 2010 and set up the To-Do Peek formatting, an then update to 2016 again?

    Saturday, November 18, 2017 1:15 PM