Items.Restrict Method is Taking very long time while trying to read the recurring appointments details RRS feed

  • Question

  • Hi All,

    I am currently working on a script to fetch the appointment details from a calendar in outlook, Initially the script didnt pull out the recurring appointments. later when i was investigating it I understood that we need to apply restrict function and then sort the items, for the recurring appointments to appear.

    But it is taking close to 30 minutes to execute completely, if I add restrict function. can you please help in understanding if there is a work around to reduce the wait time significantly.




    Monday, May 21, 2018 6:58 AM

All replies

  • When you talk about "a script" and "in Outlook", is this a VBA program (macro) inside of Outlook?  Or are you automating Outlook from a VB.Net program?  If the former, this is the wrong forum and the thread will need to be moved.  Please let us know so that we can get you the appropriate assistance.

    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    Monday, May 21, 2018 11:43 AM
  • This is all I could find about the Restrict Function, Items.Restrict Method (Outlook) and Restrict Method.

    Are you using VB.Script or VB.Net?

    It looks like restrict function is used as a filter on returned items. I don't know why it would increase any time really. If you don't use the restrict function, as a test, is the time to return all items not filtered approximately the same amount of time?

    La vida loca

    Monday, May 21, 2018 3:37 PM
  • And if we are then asking. 

    Which Outlook, Outlook is a product which is available as a client for Exchange Server, included in the Office Suit. Which can work alone and then uses its own pst file. However there is also a complete different product (although it is also a mail client) for Internet.

    Be aware if it is for Exchange server my experience was in past that the complete pub file had to be loaded first (but that is long ago).  


    Monday, May 21, 2018 4:19 PM