none
How to check which radio button is marked in Recurrence window? RRS feed

  • Question

  • Hello, 

    I have a Outlook Add-in and I need to collect all calendar and tasks items with all their properties. This is ok, but the problem comes with Recurrence Pattern.It works very well and returns almost all properties that I need, except one.

    In the 'Range of recurrence' form, the user can choose how long to continue his task when he choose one of the tree radio buttons. The Recurrence Pattern have a boolean property only for the first one - No end date.

    When the first radio is not marked I need to understand which one of the second or third is marked, but Recurrence Pattern does not have a property for them. It returns the number of occurrences and end date, but I need the checked radio button.

    Thanks for any assistance!



    • Edited by Krassko Thursday, May 31, 2018 9:01 AM
    Thursday, May 31, 2018 9:00 AM

All replies

  • Hello,

    Could you please share a screenshot of what exactly you need to get programmatically?


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

    Thursday, May 31, 2018 11:50 AM
  • Sorry, but I am not able to insert links and images I don't know why...

    I will try to explain it better.

    When you create task or appointment in Outlook you can choose to add Recurrence. When click on Recurrence there is open a form where you can choose different options.

    You can choose how long to continue your task with help of three radio buttons (only one can be choose)

    • No end date
    • End after: 3(for example) occurrences
    • End by: some date

    The RecurrencePattern is object that is associated with Outlook.AppointmentItem and Outlook.TaskItem and returns different properties for all fields except one that I need. 

    The first radio button "No end date" have a boolean property where return true or false when is checked or not.

    When the first radio is not marked I need to understand which one of the second or third is marked, but RecurrencePattern does not have a property for them. It returns the number of occurrences and end date, but I not return booleans and I cannot understand if they are checked or not.

    I am wondering can I have a event on these radio buttons or can I take their boolean properties in some other way, but I can't find anything about that.

    I don't use Ribbon or some other form and I don't need to use it in this case.

    My Outlook is 2016 and the .net framework is 4.6.1.

    I hope you understand me without screenshot.

    Thanks!

    Thursday, May 31, 2018 12:31 PM
    1. See NoEndDate.

    2. Looks like you are interested in the Occurrences property of the RecurrencePattern class which returns a Long indicating the number of occurrences of the recurrence pattern. This property allows the definition of a recurrence pattern that is only valid for the specified number of subsequent occurrences. For example, you can set this property to 10 for a formal training course that will be held on the next ten Thursday evenings. This property must be coordinated with other properties when setting up a recurrence pattern. If the PatternEndDate property or the Occurrences property is set, the pattern is considered to be finite and the NoEndDate property is False . If neither PatternEndDate nor Occurrences is set, the pattern is considered infinite and NoEndDate is True.

    3. The PatternEndDate property of the RecurrencePattern class returns a Date indicating the end date for the recurrence pattern. This property is optional but must be coordinated with other properties when setting up a recurrence pattern. If this property or the Occurrences property is set, the pattern is considered to be finite, and the NoEndDate property is False . If neither PatternEndDate nor Occurrences is set, the pattern is considered infinite and NoEndDate is True . The Interval property must be set before setting PatternEndDate .



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

    Thursday, May 31, 2018 9:43 PM