Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Do you get that error immediately or only after processing a large number of items? Most likely you are opening too many items and run out of RPC channels. Is this a cached or an online Exchange profile?</p> <p>Instead of looping through all items, use the Table object (MAPITable.GetTable) - if nothing else, it will be a lot faster.</p> <p>EDIT: If you are using Exchange, every store object (message, folder, store) opens an RPC channel. Exchange Server limits the number of RPC channels to 255 per client (can be changed on the server). Do not use "for each" loop (it keeps all items rferenced until the loop ends) and avoid multiple dot notation (because you will have implicit variables that you cannot explicitly dereference). You will also need to release all Outlook objects as soon as you are done with them.</p> <pre><code>set fldItems = mainFld.Items For i = 1 to fldItems.Count do set itm = fldItems.Item(i) 'do stuff set itm = Nothing next </code></pre> <p>As for the Table object (introduced in Outlook 2007), see <a href="http://msdn.microsoft.com/en-us/library/office/ff860769.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/office/ff860769.aspx</a>. If you need to use this in an earlier version of Outlook, you can use the <a href="http://www.dimastr.com/redemption/mapitable.htm" rel="nofollow">MAPITable</a> object in <a href="http://www.dimastr.com/redemptio" rel="nofollow">Redemption</a> (it also has a MAPITable.ExecSQL method that takes a standard SQL query and returns the ADODB.Recordset object).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload