none
Display calendar in Schedule View (Outlook 2010) RRS feed

  • Question

  • Hi,

    I am rephrasing a question I posted yesterday and hoping to get an answer.I would like to display outlook calendar in Schedule View.I looked at the available options and can see that there 1 enum property CalendarViewMode which is of type OlCalendarViewMode.This propety changes the current view to wahatever you set it to (e.g. day view,week view, work week view, month view).All these modes are available through the outlookbar except Schedule View which is not available through code.

     

    private void button1_Click_1(object sender, EventArgs e)
     {
      CalendarModule calModule = (CalendarModule)Globals.ThisAddIn.Application.ActiveExplorer().NavigationPane.Modules.GetNavigationModule(OlNavigationModuleType.olModuleCalendar);
      ((CalendarView)Globals.ThisAddIn.Application.ActiveExplorer().CurrentView).CalendarViewMode = OlCalendarViewMode.olCalendarView5DayWeek;
      ((CalendarView)Globals.ThisAddIn.Application.ActiveExplorer().CurrentView).Apply();
    }
    

     

    My question: is the schedule view missing from the VSTO API or there is another way of doing this ?

     

    Thanks in advance

     

     


    Thursday, March 24, 2011 12:24 PM

Answers

  • If there's nothing at all different in the XML from a standard Day view then the only thing I can think of would be to try copying the view and seeing if that works. If not then I'm out of ideas.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Madani Benghia" <=?utf-8?B?TWFkYW5pIEJlbmdoaWE=?=> wrote in message news:0461d9aa-f672-4623-aa82-67cc9070d856...

    Hi Ken,

    The CurrentView is of Type View which is part of the Outlook API.It is always of type CalendarView which inherits from View.After doing more testing, I could see that the Schedule View is actually just a Day View with a horizontal layout and grouping of calendars vertically.What is missing is a property that tells the system to render the view horizontally.The XML of the view is always the same , even after switching to different views.

     

    Thanks

     

    Madani

     


    Ken Slovak MVP - Outlook
    Monday, March 28, 2011 1:05 PM

All replies

  • From a brief look at this it appears that when Schedule view is selected in the UI that CurrentView.Name is just Calendar, not Schedule. Have you tried setting Explorer.CurrentView to the name?

    An alternative when setting the view might be to capture the view you want as XML and then setting Explorer.CurrentView.XML to the desired view XML.


    Ken Slovak MVP - Outlook
    Thursday, March 24, 2011 2:17 PM
  • Hi Ken,

    The CurrentView is of Type View which is part of the Outlook API.It is always of type CalendarView which inherits from View.After doing more testing, I could see that the Schedule View is actually just a Day View with a horizontal layout and grouping of calendars vertically.What is missing is a property that tells the system to render the view horizontally.The XML of the view is always the same , even after switching to different views.

     

    Thanks

     

    Madani

     

    Monday, March 28, 2011 7:36 AM
  • If there's nothing at all different in the XML from a standard Day view then the only thing I can think of would be to try copying the view and seeing if that works. If not then I'm out of ideas.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Madani Benghia" <=?utf-8?B?TWFkYW5pIEJlbmdoaWE=?=> wrote in message news:0461d9aa-f672-4623-aa82-67cc9070d856...

    Hi Ken,

    The CurrentView is of Type View which is part of the Outlook API.It is always of type CalendarView which inherits from View.After doing more testing, I could see that the Schedule View is actually just a Day View with a horizontal layout and grouping of calendars vertically.What is missing is a property that tells the system to render the view horizontally.The XML of the view is always the same , even after switching to different views.

     

    Thanks

     

    Madani

     


    Ken Slovak MVP - Outlook
    Monday, March 28, 2011 1:05 PM
  • Thanks Ken.

     

    Solution is here:

    http://social.msdn.microsoft.com/Forums/en/vsto/thread/90c01547-2b85-4d6d-8160-0ff33def6a88

    Wednesday, April 6, 2011 1:56 PM