none
Disable recurring button while opening reoccurring appointment in InspectorsEvents_NewInspector RRS feed

  • Question

  • Hi 

    we have one outlook plugin we want to stop modification of recurring appointment pattern or time by clicking recurrence icon on appointment.

    How can i disable recurrence icon when appointment open i.e.  InspectorsEvents_NewInspector  event triggered.

    Kindly help asap we need code in C# 


    Neeraj

    Wednesday, October 17, 2018 1:35 PM

All replies

  • Hi Neerajb,

    At first, determine whether it is a reoccurring appointment.

    You could use “RecurrenceState” property of AppointmentItem.

    olApptOccurrence: 2 - The appointment is an occurrence of a recurring appointment defined by a master appointment.

    For more information, you could refer to this link:

    Secondly, set this item Read-Only.

    Please refer to this link:

    Regards,

    Alina

    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.




    Thursday, October 18, 2018 3:33 AM
  • I want recurrence  ribbon icon to be disable but item can be modified for other property  like subject, location, body attendee.

    This will disable complete object . Please provide solution in C#

     

    Neeraj

    Friday, October 19, 2018 6:05 AM
  • Hi Neerajb,

    The idMso for the tab is “TabAppointment”. You need to evaluate which button or buttons you want to check for visibility and use the idMso for the button to see if it's visible.

    Explorer.CommandBars.GetVisibleMSO() would be the call to make once you decide which idMso you want to use.

    You could use this method to get recurrence button, then set it not visible.

    For more information, you could reference these links:

    Regards,

    Alina

    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.

    Tuesday, October 23, 2018 2:33 AM
  • Thanks,

    I have tried newInspector.CommandBars.GetVisibleMso("Recurrence") it gives me only information that control visible or not (bool return type). I want control object for Recurrence  button to make it enable/disable

    Please help me asap.

    Regards

    Neeraj


    Neeraj

    Wednesday, October 24, 2018 1:08 PM
  • Hi Neerajb,

    According to my test,  you could create a XML Ribbon use xml to disabled Recurrence command.

    You could create a XML ribbon as follow:

    <?xml version="1.0" encoding="UTF-8"?>
    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
      <commands>
              <command idMso="Recurrence" enabled="false" />
      </commands>
    </customUI>

    For more information, Please refer to these link:

    Regards,

    Alina

     


    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.



    Thursday, October 25, 2018 8:13 AM
  • thanks i was able to disable recurring button using xml. but how to do dynamically.

    Please help

       

    Neeraj

    Monday, October 29, 2018 5:39 AM
  • Hi Neerajb,

    You could use Ribbon XML Route or Ribbon Designer Route to judge whether it is recurrence appointment.

    If yes, perform this xml Ribbon.

    For more information, Please refer to this link:

    VSTO - Is it possible to have both designer and XML ribbons?

    Regards,

    Alina


    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.

    Monday, October 29, 2018 6:05 AM
  • thanks.

    but  Ribbon XML Route or Ribbon Designer Route get called only once if i am opening multiple appointment then it will get called only once. i want to change then ribbon on every inspector Inspectors_NewInspector event means on every appointment opening. 

    Kindly suggest solution..   


    Neeraj

    Tuesday, October 30, 2018 9:58 AM
  • kindly help asap

    Neeraj

    Thursday, November 1, 2018 10:30 AM
  •  Ribbon XML Route or Ribbon Designer Route get called only once if i am opening multiple appointment then it will get called only once. i want to change then ribbon on every inspector Inspectors_NewInspector event means on every appointment opening. 

    Please help..


    Neeraj

    Friday, November 2, 2018 1:28 PM