.net - Outlook 2013 VSTO - Get calendar selected range + callback -


how can retrieve displayed date range in outlook calendar? example, when open week view of current week, need know in code current calendar displays range 2015-09-21 2015-09-27.

let's assume have reference calendar mapifolder object. found out object has currentview member several promising properties. displayeddates contains no items, filter empty , selectedendtime / selectedstarttime both points 4501-01-01, i.e. no date set. doing wrong? , yes, @ time of evaluating object, calendar view in outlook open , active.

second question: after possible current display range, there callback or event can consume fired when display range changes?

try use currentview property of explorer class, not folder. obtain view object view of current explorer, use explorer.currentview instead of currentview property of current folder object returned explorer.currentfolder.

here msdn states:

the view object allows create customizable views allow better sort, group , view data of different types. there variety of different view types provide flexibility needed create , maintain important data.

  • the table view type (oltableview) allows view data in simple field-based table.
  • the calendar view type (olcalendarview) allows view data in calendar format.
  • the card view type (olcardview) allows view data in series of cards. each card displays information contained item , can sorted.
  • the icon view type (oliconview) allows view data icons, similar windows folder or explorer.
  • the timeline view type (oltimelineview) allows view data received in customizable linear time line.

views defined , customized using view object's xml property. xml property allows create , set customized xml schema defines various features of view.

after possible current display range, there callback or event can consume fired when display range changes?

no, outlook object model doesn't provide such events. however, may try handle beforeviewswitch event of explorer class fired before explorer changes new view, either result of user action or through program code.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -