...administrator has limited the number of items you can open simultaneously

Status
Not open for further replies.

Blair

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Exchange Server
I am attempting to cycle through the selected items in a displayed (Exchange) folder in the Outlook Explorer, and extract pieces of information from the e-mail messages there.

Based on code I found on this site, I have reproduced the problem as simply as possible. The code I'm using is listed below.

The problem I'm encountering is on the debug.print line, after VBA cycles through about 247 messages, it errors with the message,

Code:
Microsoft Visual Basic
Run-time error '-2147220731 (80040305)':

Your server administrator has limited the number of items you can open simultaneously. Try closing messages you have opened or removing attachments and images from unsent messages
However, if that same debug.print line uses the data element ".subject" instead of ".SenderName", the code works fine, and can cycle through a thousand or more messages.

I've read there may be a need to do some clean-up of objects, but I cannot quite understand exactly where or how I would do this. I'm setting "obj=nothing" after getting the information I need for each pass through the For/Next loop, but this does not resolve the problem. I've found articles describing the possibility of doing a garbage collection, or using a Marshal command, but these result in a syntax error, perhaps because I don't have the right references set in my VBA project?

I would be very grateful for any assistance or guidance in this matter.

Code:
Option Explicit

Public Sub ReproduceErr()
Dim currentExplorer As Explorer
Dim obj As Object
Dim Selection As Selection
Dim Session As Outlook.NameSpace
Set currentExplorer = Application.ActiveExplorer
Set Selection = currentExplorer.Selection

    For Each obj In Selection
        With obj
            Debug.Print .SenderName  'This caused the too many items failure when more than 250 items are selected
        End With
        Set obj = Nothing
    Next
    MsgBox "Complete"
'Clean up objects
Set Session = Nothing
Set currentExplorer = Nothing
Set obj = Nothing
Set Selection = Nothing

End Sub
 

Blair

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Exchange Server
Michael,

Thanks. That is helpful, although that code operates on all items within a specified folder. I'll have to play with it to get it to function for selected messages.

Time for a refresher on Outlook's object model.

-Blair
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Look at the code, instead of looping through Items, you'd loop through Selection.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Yeah, using cached mode resolves a lot of issues...
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
S Your server administrator has limited the number of items you can Outlook VBA and Custom Forms 5
A Outlook 2007 Issue - Your server administrator has limited the number of items you can open simultan Using Outlook 3
M The operation has been cancelled due to restrictions on your computer.Please contact your system administrator Using Outlook 1
M The operation has been cancelled due to restrictions in effect on this computer. Contact administrator'__ Using Outlook 1
G operation has been cancelled due to restrictions in effect on htis computer. Please contact your system administrator. Using Outlook 1
I this operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator Using Outlook 1
M operation has be cancelled due restriction on this computer, please contact your system administrator Using Outlook 2
A When I click a hyperlink in Outlook 2007 I get a message saying action has been closed - refer to administrator.__How do I turn this off? Using Outlook 1
R This operation has been canceled due to restrictions on this computer. Please contact your administrator. Using Outlook 1
D This operation has been cancelled due to restrictions in effeect on this computer. Please contact your administrator Using Outlook 1
C This operation has been canceled due to restrictions in effect on this computer. Please contact you system administrator. Error message Using Outlook 1
P This operation has ben cancelled due to restrictions in effect on this computer. Contact your system administrator. Using Outlook 1
B 'This operation has been canceled due to restrictions on this computer Please contact your administrator. Using Outlook 1
J This operation has been canceled due to restrictions in effect on this computer. Please contact your system administrator. ok Using Outlook 1
D This operation has been canceled due to restrictions in effect on this computer. Please contact your system administrator.__ Using Outlook 1
C The opertion has been cancelled due to restrictions in effect on this computer. Please contact system administrator. Using Outlook 1
F Outlook web access did not initialize. An event has been logeed so that the system administrator can Using Outlook 4
P The Microsoft Exchange Administrator has made a change that requires you quit and restart Outlook Exchange Server Administration 7
L This operation has been cancelled due to restrictions in effect on this computer. Please contat your system administrator. Using Outlook 2
G This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator Using Outlook 1
L operation has been cancelled due to restrictions on this computer. please contact your systems administrator............. Using Outlook 2
R 'This operation has been canceled due to restrictions in effect on this computer. Please contact your system administrator.' Using Outlook 2
8 'This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator. Using Outlook 0
F Your mailbox has exceeded one or more size limits set by your administrator.__ Using Outlook 2
L Microsoft Outlook 'This operation has been canceled due to restrictions on this computer. Please contact system administrator.' Using Outlook 0
T this operation has been canceled due to restrictions on this computer. Contact your system administrator Using Outlook 3
P This operation has been canceled due to restrictions in effect on this computer. Pleas contact your system administrator Using Outlook 5
S "Symstem Administrator" rejects msgs. Using Outlook 1
F System administrator undeliverable in outlook 2007 Using Outlook 1
C can't backup OL 2007 (error message 0x80070021) + only done by administrator Using Outlook 1
S Action cancel contact with pc administrator Using Outlook 1
M How do I get a copy of the NDRs sent to an administrator in EX2010 Exchange Server Administration 4
C Exchange 2007 Shell command to find users who are members of Recipient Administrator Exchange Server Administration 3
J Tool to analyze administrator and mailbox audit log entries Exchange Server Administration 1
R Deleted Exchange administrator account Exchange Server Administration 2
G Mailmerge setting in administrator tools Using Outlook 1
J When I try to click on a link embedded in an email I get an error that says that computer restrictions prevent access. Call the system administrator Using Outlook 1
F when I try and click on an email redirect it says contact system administrator Using Outlook 1
J cannot enable embedded links within received e mails, message sysy this function is disabled please contact your system administrator Using Outlook 1
C Need to know how to allow a hyperlink to work from and email in outlook 2010. Currently they are blocked and telling me to check with administrator. Using Outlook 3
T Bounce error. System Administrator ... Your message did not reach some or all of the intended recip Using Outlook 2
J Exchange 2010 installation - A configuration started by another administrator is currently in progress Exchange Server Administration 1
P Exchange management shell: administrator cannott access Exchange Server Administration 2
C Hyperlinks will not open...message says 'operation cancelled...contact administrator' __ Using Outlook 2
O How to open the administrator account Using Outlook 5
M When I receive email with links to web site it tell me that I need to contact an administrator Using Outlook 1
S How to set Exchange 2007 Mailbox Size Warning Notification send to administrator Exchange Server Administration 3
J system administrator Using Outlook 1
U I've had to create another Administrator file, because someone accedentily put a password onto my e-mail. I still can not recieve or send e-mails Using Outlook 2
S The form you are trying to access is unavailable contact your System Administrator message In Outlook 2007 Using Outlook 4
Similar threads


















































Top