A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Outlook 2007/Exchange 2003 error when creating multiple items



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 15th 07, 07:53 AM posted to microsoft.public.outlook.program_vba
Tadwick
external usenet poster
 
Posts: 104
Default Outlook 2007/Exchange 2003 error when creating multiple items

I am using VBA to send a number of meeting invites to a resource mailbox for
some testing. I get the following message once about 131 items have been
sent.

"Error -2147220731 : 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 you are composing."

In my code I save and send each item and then set the itm and application
objects to nothing.

Any ideas why Outlook or Exchange assume I have so much open?
  #2  
Old January 15th 07, 04:05 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Outlook 2007/Exchange 2003 error when creating multiple items

The 255 channel RPC limit that Exchange imposes (changeable from the server
registry) is what you are seeing.

In a loop the internal variables that are created plus any explicit objects
that you create may not necessarily be released until the procedure with the
loop is terminated.

Make sure that you assign explicit object variables instead of using
compound dot operators and make sure to release all the object variables in
each pass of the loop. That might help some. If that's not enough you might
just have to call your loop procedure multiple times, maintaining a counter
until you run through the entire collection. That would let the RPC channels
be released as the procedure ends and the objects it declares both
implicitly and explicitly go out of scope.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Tadwick" wrote in message
...
I am using VBA to send a number of meeting invites to a resource mailbox
for
some testing. I get the following message once about 131 items have been
sent.

"Error -2147220731 : 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 you are composing."

In my code I save and send each item and then set the itm and application
objects to nothing.

Any ideas why Outlook or Exchange assume I have so much open?


  #3  
Old January 15th 07, 11:18 PM posted to microsoft.public.outlook.program_vba
Tadwick
external usenet poster
 
Posts: 104
Default Outlook 2007/Exchange 2003 error when creating multiple items

Hi Ken,

Thanks for all those suggestions. I tried all the coding suggestions but to
no avail. I also tried applying the latest service pack and changing the
server registry settings following
http://technet.microsoft.com/en-us/l.../aa997175.aspx (ie Max RPC Calls
Outstanding (500) , Gateway In Threads (2) and Gateway Out Threads (2) -
hopefully this was right).

Here's my code - maybe I haven't followed your suggestions on assigning
variables properly.
------------------------------------------------------------
Option Explicit

Sub BookResources()
'************************************************* **********
'Purpose is to book several resources programmatically
'
'Approach is to create an appointment item with Outlook object
'model and send to the resource mailbox.
'
'Environment is XP Pro SP2 w/OL2007, Windows Server 2003
'w/Exchange Server 2003 SP2
'
'Prerequisites are resource mailboxes created as windows
'accounts with calendar options set to accept all meeting
'requests and author permissions granted to client account
'************************************************* **********

Dim Rcps(10) As String 'Array of resource names (recipients)

Dim PeriodStart As Date 'Date when you want to start book resources
Dim PeriodEnd As Date 'Date when you want to stop booking resources

Dim AppStart As Date 'Start of a randomly generated appointment
Dim AppEnd As Date 'End of that appointment
Dim NextDay As Date 'Used for date calculations

'All duration and offset units are hours
Dim MinDuration As Single 'Minimum appointment duration
Dim MaxDuration As Single 'Maximum appointment duration

Dim MinOffset As Integer 'Minimum time til next appointment
Dim MaxOffset As Integer 'Maximum time til next appointment

Dim i As Integer 'Counter

Dim Offset As Integer 'Calculated offset til next appointment
Dim Duration As Integer 'Calculated appointment duration

On Error GoTo eh 'Set up error handling

'Define meeting rooms
Rcps(0) = "Room Arbutus"
Rcps(1) = "Room Balsa"
Rcps(2) = "Room Beech"
Rcps(3) = "Room Cedar"
Rcps(4) = "Room Cherry"
Rcps(5) = "Room Fir"
Rcps(6) = "Room Hemlock"
Rcps(7) = "Room Madrone"
Rcps(8) = "Room Oak"
Rcps(9) = "Room Willow"

PeriodStart = DateSerial(2007, 1, 15)
PeriodEnd = DateAdd("m", 6, PeriodStart) 'Going to add 6 months worth of
appointments

MinDuration = 0.5 'hours
MaxDuration = 12

MinOffset = 0
MaxOffset = 6


'for each resource
For i = 0 To 9
AppStart = PeriodStart
AppEnd = PeriodStart

Do While AppStart PeriodEnd

Duration = 30 * Int((CInt(2 * MaxDuration) - CInt(2 * MinDuration) +
1) * Rnd * Rnd * Rnd + CInt(2 * MinDuration))
Offset = 60 * Int((MaxOffset - MinOffset + 1) * Rnd + MinOffset)

'Make sure appointment starts no earlier than 0800 or later than 2030
'and that it doesn't occur on a weekend
AppStart = DateAdd("n", Offset, AppEnd)

If AppStart DateAdd("h", 20.5, DateSerial(Year(AppStart),
Month(AppStart), Day(AppStart))) Then
NextDay = DateAdd("d", 1, DateSerial(Year(AppStart),
Month(AppStart), Day(AppStart)))
AppStart = DateAdd("h", 8, NextDay)
ElseIf Hour(AppStart) 8 Then
AppStart = DateAdd("h", 8, DateSerial(Year(AppStart),
Month(AppStart), Day(AppStart)))
AppStart = DateAdd("n", Offset, AppStart)
End If

If Weekday(AppStart, vbMonday) 5 Then 'move to next week
AppStart = DateAdd("d", 2, DateSerial(Year(AppStart),
Month(AppStart), Day(AppStart)))
AppStart = DateAdd("h", 8, AppStart)
AppStart = DateAdd("n", Offset, AppStart)
End If

AppEnd = DateAdd("n", Duration, AppStart)
If Weekday(AppEnd, vbMonday) vbFriday Then 'end today
AppEnd = DateSerial(Year(AppEnd), Month(AppEnd), Day(AppEnd))
AppEnd = DateAdd("h", 21, AppEnd)
End If

If AppEnd DateAdd("h", 21, DateSerial(Year(AppEnd), Month(AppEnd),
Day(AppEnd))) Then
AppEnd = DateAdd("h", 21, DateSerial(Year(AppEnd),
Month(AppEnd), Day(AppEnd)))
End If


Duration = DateDiff("n", AppStart, AppEnd)

BookResource Rcps(i), AppStart, Duration

Debug.Print j & ", " & Rcps(i) & ", " & AppStart & ", " & AppEnd &
", " & Duration

Loop
Next


'Quit procedure
Exit Sub

'Error handler
eh:
MsgBox "Error : " & Err.Number & ", " & Err.Description
Resume Next

End Sub


Sub BookResource(Rcp As String, AppStart As Date, Duration As Integer)

'Declare variables
Dim oApp As New Outlook.Application 'Outlook application instance
Dim oItm As AppointmentItem 'Outlook item object

On Error GoTo eh

Set oItm = oApp.CreateItem(olAppointmentItem)

'Define the item as a meeting and set other attributes
oItm.MeetingStatus = olMeeting

Select Case Duration
Case 0 To 60
oItm.Subject = "Short Meeting"
Case 61 To 1440
oItm.Subject = "Long Meeting"
Case Else
oItm.Subject = "Very Long Meeting"
End Select

oItm.Location = Rcp
oItm.Start = AppStart
oItm.Duration = Duration

'Add recipient
oItm.Resources = Rcp

'Define recipient as a resource


oItm.Save
oItm.Send

'Clean up objects
Set oItm = Nothing
Set oApp = Nothing

'Quit procedure
Exit Sub

'Error handler
eh:
MsgBox "Error : " & Err.Number & ", " & Err.Description

End Sub








"Ken Slovak - [MVP - Outlook]" wrote:

The 255 channel RPC limit that Exchange imposes (changeable from the server
registry) is what you are seeing.

In a loop the internal variables that are created plus any explicit objects
that you create may not necessarily be released until the procedure with the
loop is terminated.

Make sure that you assign explicit object variables instead of using
compound dot operators and make sure to release all the object variables in
each pass of the loop. That might help some. If that's not enough you might
just have to call your loop procedure multiple times, maintaining a counter
until you run through the entire collection. That would let the RPC channels
be released as the procedure ends and the objects it declares both
implicitly and explicitly go out of scope.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Tadwick" wrote in message
...
I am using VBA to send a number of meeting invites to a resource mailbox
for
some testing. I get the following message once about 131 items have been
sent.

"Error -2147220731 : 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 you are composing."

In my code I save and send each item and then set the itm and application
objects to nothing.

Any ideas why Outlook or Exchange assume I have so much open?



  #4  
Old January 16th 07, 12:03 AM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Outlook 2007/Exchange 2003 error when creating multiple items

Is this Outlook VBA? If so never create an instance of the Outlook
application. Always use the intrinsic Application object.

I'm wondering if all those sent items are still in Outbox when you get the
error?

After all those settings changes did you change the metric where the error
occurs?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Tadwick" wrote in message
...
Hi Ken,

Thanks for all those suggestions. I tried all the coding suggestions but
to
no avail. I also tried applying the latest service pack and changing the
server registry settings following
http://technet.microsoft.com/en-us/l.../aa997175.aspx (ie Max RPC Calls
Outstanding (500) , Gateway In Threads (2) and Gateway Out Threads (2) -
hopefully this was right).

Here's my code - maybe I haven't followed your suggestions on assigning
variables properly.
------------------------------------------------------------
Option Explicit

Sub BookResources()
'************************************************* **********
'Purpose is to book several resources programmatically
'
'Approach is to create an appointment item with Outlook object
'model and send to the resource mailbox.
'
'Environment is XP Pro SP2 w/OL2007, Windows Server 2003
'w/Exchange Server 2003 SP2
'
'Prerequisites are resource mailboxes created as windows
'accounts with calendar options set to accept all meeting
'requests and author permissions granted to client account
'************************************************* **********

Dim Rcps(10) As String 'Array of resource names (recipients)

Dim PeriodStart As Date 'Date when you want to start book resources
Dim PeriodEnd As Date 'Date when you want to stop booking resources

Dim AppStart As Date 'Start of a randomly generated appointment
Dim AppEnd As Date 'End of that appointment
Dim NextDay As Date 'Used for date calculations

'All duration and offset units are hours
Dim MinDuration As Single 'Minimum appointment duration
Dim MaxDuration As Single 'Maximum appointment duration

Dim MinOffset As Integer 'Minimum time til next appointment
Dim MaxOffset As Integer 'Maximum time til next appointment

Dim i As Integer 'Counter

Dim Offset As Integer 'Calculated offset til next appointment
Dim Duration As Integer 'Calculated appointment duration

On Error GoTo eh 'Set up error handling

'Define meeting rooms
Rcps(0) = "Room Arbutus"
Rcps(1) = "Room Balsa"
Rcps(2) = "Room Beech"
Rcps(3) = "Room Cedar"
Rcps(4) = "Room Cherry"
Rcps(5) = "Room Fir"
Rcps(6) = "Room Hemlock"
Rcps(7) = "Room Madrone"
Rcps(8) = "Room Oak"
Rcps(9) = "Room Willow"

PeriodStart = DateSerial(2007, 1, 15)
PeriodEnd = DateAdd("m", 6, PeriodStart) 'Going to add 6 months worth of
appointments

MinDuration = 0.5 'hours
MaxDuration = 12

MinOffset = 0
MaxOffset = 6


'for each resource
For i = 0 To 9
AppStart = PeriodStart
AppEnd = PeriodStart

Do While AppStart PeriodEnd

Duration = 30 * Int((CInt(2 * MaxDuration) - CInt(2 * MinDuration)
+
1) * Rnd * Rnd * Rnd + CInt(2 * MinDuration))
Offset = 60 * Int((MaxOffset - MinOffset + 1) * Rnd + MinOffset)

'Make sure appointment starts no earlier than 0800 or later than
2030
'and that it doesn't occur on a weekend
AppStart = DateAdd("n", Offset, AppEnd)

If AppStart DateAdd("h", 20.5, DateSerial(Year(AppStart),
Month(AppStart), Day(AppStart))) Then
NextDay = DateAdd("d", 1, DateSerial(Year(AppStart),
Month(AppStart), Day(AppStart)))
AppStart = DateAdd("h", 8, NextDay)
ElseIf Hour(AppStart) 8 Then
AppStart = DateAdd("h", 8, DateSerial(Year(AppStart),
Month(AppStart), Day(AppStart)))
AppStart = DateAdd("n", Offset, AppStart)
End If

If Weekday(AppStart, vbMonday) 5 Then 'move to next week
AppStart = DateAdd("d", 2, DateSerial(Year(AppStart),
Month(AppStart), Day(AppStart)))
AppStart = DateAdd("h", 8, AppStart)
AppStart = DateAdd("n", Offset, AppStart)
End If

AppEnd = DateAdd("n", Duration, AppStart)
If Weekday(AppEnd, vbMonday) vbFriday Then 'end today
AppEnd = DateSerial(Year(AppEnd), Month(AppEnd), Day(AppEnd))
AppEnd = DateAdd("h", 21, AppEnd)
End If

If AppEnd DateAdd("h", 21, DateSerial(Year(AppEnd),
Month(AppEnd),
Day(AppEnd))) Then
AppEnd = DateAdd("h", 21, DateSerial(Year(AppEnd),
Month(AppEnd), Day(AppEnd)))
End If


Duration = DateDiff("n", AppStart, AppEnd)

BookResource Rcps(i), AppStart, Duration

Debug.Print j & ", " & Rcps(i) & ", " & AppStart & ", " & AppEnd &
", " & Duration

Loop
Next


'Quit procedure
Exit Sub

'Error handler
eh:
MsgBox "Error : " & Err.Number & ", " & Err.Description
Resume Next

End Sub


Sub BookResource(Rcp As String, AppStart As Date, Duration As Integer)

'Declare variables
Dim oApp As New Outlook.Application 'Outlook application instance
Dim oItm As AppointmentItem 'Outlook item object

On Error GoTo eh

Set oItm = oApp.CreateItem(olAppointmentItem)

'Define the item as a meeting and set other attributes
oItm.MeetingStatus = olMeeting

Select Case Duration
Case 0 To 60
oItm.Subject = "Short Meeting"
Case 61 To 1440
oItm.Subject = "Long Meeting"
Case Else
oItm.Subject = "Very Long Meeting"
End Select

oItm.Location = Rcp
oItm.Start = AppStart
oItm.Duration = Duration

'Add recipient
oItm.Resources = Rcp

'Define recipient as a resource


oItm.Save
oItm.Send

'Clean up objects
Set oItm = Nothing
Set oApp = Nothing

'Quit procedure
Exit Sub

'Error handler
eh:
MsgBox "Error : " & Err.Number & ", " & Err.Description

End Sub


  #5  
Old January 16th 07, 05:00 AM posted to microsoft.public.outlook.program_vba
Tadwick
external usenet poster
 
Posts: 104
Default Outlook 2007/Exchange 2003 error when creating multiple items

Hi Ken,

Is this better?


Dim oApp As Outlook.Application 'Outlook application instance
Dim oItm As Outlook.AppointmentItem 'Outlook item object

Set oApp = New Outlook.Application
Set oItm = Application.CreateItem(olAppointmentItem)

The outbox didn't look like it was being accessed and the program code still
hung after about 131 items sent, even with all the client/server side
adjustments.




"Ken Slovak - [MVP - Outlook]" wrote:

Is this Outlook VBA? If so never create an instance of the Outlook
application. Always use the intrinsic Application object.

I'm wondering if all those sent items are still in Outbox when you get the
error?

After all those settings changes did you change the metric where the error
occurs?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Tadwick" wrote in message
...
Hi Ken,

Thanks for all those suggestions. I tried all the coding suggestions but
to
no avail. I also tried applying the latest service pack and changing the
server registry settings following
http://technet.microsoft.com/en-us/l.../aa997175.aspx (ie Max RPC Calls
Outstanding (500) , Gateway In Threads (2) and Gateway Out Threads (2) -
hopefully this was right).

Here's my code - maybe I haven't followed your suggestions on assigning
variables properly.
------------------------------------------------------------
Option Explicit

Sub BookResources()
'************************************************* **********
'Purpose is to book several resources programmatically
'
'Approach is to create an appointment item with Outlook object
'model and send to the resource mailbox.
'
'Environment is XP Pro SP2 w/OL2007, Windows Server 2003
'w/Exchange Server 2003 SP2
'
'Prerequisites are resource mailboxes created as windows
'accounts with calendar options set to accept all meeting
'requests and author permissions granted to client account
'************************************************* **********

Dim Rcps(10) As String 'Array of resource names (recipients)

Dim PeriodStart As Date 'Date when you want to start book resources
Dim PeriodEnd As Date 'Date when you want to stop booking resources

Dim AppStart As Date 'Start of a randomly generated appointment
Dim AppEnd As Date 'End of that appointment
Dim NextDay As Date 'Used for date calculations

'All duration and offset units are hours
Dim MinDuration As Single 'Minimum appointment duration
Dim MaxDuration As Single 'Maximum appointment duration

Dim MinOffset As Integer 'Minimum time til next appointment
Dim MaxOffset As Integer 'Maximum time til next appointment

Dim i As Integer 'Counter

Dim Offset As Integer 'Calculated offset til next appointment
Dim Duration As Integer 'Calculated appointment duration

On Error GoTo eh 'Set up error handling

'Define meeting rooms
Rcps(0) = "Room Arbutus"
Rcps(1) = "Room Balsa"
Rcps(2) = "Room Beech"
Rcps(3) = "Room Cedar"
Rcps(4) = "Room Cherry"
Rcps(5) = "Room Fir"
Rcps(6) = "Room Hemlock"
Rcps(7) = "Room Madrone"
Rcps(8) = "Room Oak"
Rcps(9) = "Room Willow"

PeriodStart = DateSerial(2007, 1, 15)
PeriodEnd = DateAdd("m", 6, PeriodStart) 'Going to add 6 months worth of
appointments

MinDuration = 0.5 'hours
MaxDuration = 12

MinOffset = 0
MaxOffset = 6


'for each resource
For i = 0 To 9
AppStart = PeriodStart
AppEnd = PeriodStart

Do While AppStart PeriodEnd

Duration = 30 * Int((CInt(2 * MaxDuration) - CInt(2 * MinDuration)
+
1) * Rnd * Rnd * Rnd + CInt(2 * MinDuration))
Offset = 60 * Int((MaxOffset - MinOffset + 1) * Rnd + MinOffset)

'Make sure appointment starts no earlier than 0800 or later than
2030
'and that it doesn't occur on a weekend
AppStart = DateAdd("n", Offset, AppEnd)

If AppStart DateAdd("h", 20.5, DateSerial(Year(AppStart),
Month(AppStart), Day(AppStart))) Then
NextDay = DateAdd("d", 1, DateSerial(Year(AppStart),
Month(AppStart), Day(AppStart)))
AppStart = DateAdd("h", 8, NextDay)
ElseIf Hour(AppStart) 8 Then
AppStart = DateAdd("h", 8, DateSerial(Year(AppStart),
Month(AppStart), Day(AppStart)))
AppStart = DateAdd("n", Offset, AppStart)
End If

If Weekday(AppStart, vbMonday) 5 Then 'move to next week
AppStart = DateAdd("d", 2, DateSerial(Year(AppStart),
Month(AppStart), Day(AppStart)))
AppStart = DateAdd("h", 8, AppStart)
AppStart = DateAdd("n", Offset, AppStart)
End If

AppEnd = DateAdd("n", Duration, AppStart)
If Weekday(AppEnd, vbMonday) vbFriday Then 'end today
AppEnd = DateSerial(Year(AppEnd), Month(AppEnd), Day(AppEnd))
AppEnd = DateAdd("h", 21, AppEnd)
End If

If AppEnd DateAdd("h", 21, DateSerial(Year(AppEnd),
Month(AppEnd),
Day(AppEnd))) Then
AppEnd = DateAdd("h", 21, DateSerial(Year(AppEnd),
Month(AppEnd), Day(AppEnd)))
End If


Duration = DateDiff("n", AppStart, AppEnd)

BookResource Rcps(i), AppStart, Duration

Debug.Print j & ", " & Rcps(i) & ", " & AppStart & ", " & AppEnd &
", " & Duration

Loop
Next


'Quit procedure
Exit Sub

'Error handler
eh:
MsgBox "Error : " & Err.Number & ", " & Err.Description
Resume Next

End Sub


Sub BookResource(Rcp As String, AppStart As Date, Duration As Integer)

'Declare variables
Dim oApp As New Outlook.Application 'Outlook application instance
Dim oItm As AppointmentItem 'Outlook item object

On Error GoTo eh

Set oItm = oApp.CreateItem(olAppointmentItem)

'Define the item as a meeting and set other attributes
oItm.MeetingStatus = olMeeting

Select Case Duration
Case 0 To 60
oItm.Subject = "Short Meeting"
Case 61 To 1440
oItm.Subject = "Long Meeting"
Case Else
oItm.Subject = "Very Long Meeting"
End Select

oItm.Location = Rcp
oItm.Start = AppStart
oItm.Duration = Duration

'Add recipient
oItm.Resources = Rcp

'Define recipient as a resource


oItm.Save
oItm.Send

'Clean up objects
Set oItm = Nothing
Set oApp = Nothing

'Quit procedure
Exit Sub

'Error handler
eh:
MsgBox "Error : " & Err.Number & ", " & Err.Description

End Sub



  #6  
Old January 16th 07, 03:09 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Outlook 2007/Exchange 2003 error when creating multiple items

No declarations are needed at all, and you don't need to declare an
Outlook.Application object if you don't want to.

Dim oApp As Outlook.Application
Set oApp = Application
Set oItm = oApp.CreateItem(olAppointmentItem)

or just

Set oItm = Application.CreateItem(olAppointmentItem)

I don't understand what you mean by "The outbox didn't look like it was
being accessed".

If you send the items they should be in Outbox or if sent from there they
should be in Sent Items.

Offhand I have no idea why you are receiving that error still after all the
changes. All I can suggest is to limit your calls to send to 100 at a clip
and do that repeatedly.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Tadwick" wrote in message
...
Hi Ken,

Is this better?


Dim oApp As Outlook.Application 'Outlook application instance
Dim oItm As Outlook.AppointmentItem 'Outlook item object

Set oApp = New Outlook.Application
Set oItm = Application.CreateItem(olAppointmentItem)

The outbox didn't look like it was being accessed and the program code
still
hung after about 131 items sent, even with all the client/server side
adjustments.


  #7  
Old February 23rd 07, 06:21 PM posted to microsoft.public.outlook.program_vba
Brian Scheele
external usenet poster
 
Posts: 1
Default Outlook 2007/Exchange 2003 error when creating multiple items

I am having the same issue, except mine has nothing to do with any code that
was written. Sometimes I have "too many" items open and it causes this or I
have nothing open at all except an email I am trying to reply to and I get
the message. Sometimes it is just an Operation Failed message, so then I try
to save it to drafts and I get the Your server administrator has limited the
number of items message

I posted my full message with this subject a short while ago:

Subject: Your server administrator has limited the number of items you can
2/23/2007 6:10 AM PST
--


Brian Scheele
IT Manager
Clark Filter
3649 Hempland Road
Lancaster, PA 17601-1323


"Ken Slovak - [MVP - Outlook]" wrote:

The 255 channel RPC limit that Exchange imposes (changeable from the server
registry) is what you are seeing.

In a loop the internal variables that are created plus any explicit objects
that you create may not necessarily be released until the procedure with the
loop is terminated.

Make sure that you assign explicit object variables instead of using
compound dot operators and make sure to release all the object variables in
each pass of the loop. That might help some. If that's not enough you might
just have to call your loop procedure multiple times, maintaining a counter
until you run through the entire collection. That would let the RPC channels
be released as the procedure ends and the objects it declares both
implicitly and explicitly go out of scope.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Tadwick" wrote in message
...
I am using VBA to send a number of meeting invites to a resource mailbox
for
some testing. I get the following message once about 131 items have been
sent.

"Error -2147220731 : 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 you are composing."

In my code I save and send each item and then set the itm and application
objects to nothing.

Any ideas why Outlook or Exchange assume I have so much open?



  #8  
Old February 23rd 07, 06:33 PM posted to microsoft.public.outlook.program_vba
Tadwick
external usenet poster
 
Posts: 104
Default Outlook 2007/Exchange 2003 error when creating multiple items

Brian - thanks for letting me know


"Brian Scheele" wrote:

I am having the same issue, except mine has nothing to do with any code that
was written. Sometimes I have "too many" items open and it causes this or I
have nothing open at all except an email I am trying to reply to and I get
the message. Sometimes it is just an Operation Failed message, so then I try
to save it to drafts and I get the Your server administrator has limited the
number of items message

I posted my full message with this subject a short while ago:

Subject: Your server administrator has limited the number of items you can
2/23/2007 6:10 AM PST
--


Brian Scheele
IT Manager
Clark Filter
3649 Hempland Road
Lancaster, PA 17601-1323


"Ken Slovak - [MVP - Outlook]" wrote:

The 255 channel RPC limit that Exchange imposes (changeable from the server
registry) is what you are seeing.

In a loop the internal variables that are created plus any explicit objects
that you create may not necessarily be released until the procedure with the
loop is terminated.

Make sure that you assign explicit object variables instead of using
compound dot operators and make sure to release all the object variables in
each pass of the loop. That might help some. If that's not enough you might
just have to call your loop procedure multiple times, maintaining a counter
until you run through the entire collection. That would let the RPC channels
be released as the procedure ends and the objects it declares both
implicitly and explicitly go out of scope.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Tadwick" wrote in message
...
I am using VBA to send a number of meeting invites to a resource mailbox
for
some testing. I get the following message once about 131 items have been
sent.

"Error -2147220731 : 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 you are composing."

In my code I save and send each item and then set the itm and application
objects to nothing.

Any ideas why Outlook or Exchange assume I have so much open?



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook 2003 Exchange 2003 Sent Items Retention Stu Howe Outlook - General Queries 7 December 15th 06 01:48 PM
Creating Shared Calendar in Outlook 2003 without Exchange Server Greg Outlook - Calandaring 1 November 9th 06 07:33 PM
Outlook 2007 - client for multiple exchange servers Lee Outlook - General Queries 2 October 16th 06 06:27 PM
Creating a Calendar in Exchange 5.5 Public Folders...Rights error. Chris Stephens Outlook - Calandaring 1 May 4th 06 02:32 PM
Inbox, Sent Items & Outbox in Deleted Items in Outlook 2003 & OWA with Exchange splounx Outlook - General Queries 1 February 17th 06 02:22 AM


All times are GMT +1. The time now is 06:59 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.