FIX: Folder.Messages.Delete Hangs Visual Basic (183247)



The information in this article applies to:

  • Collaboration Data Objects (CDO) 1.1

This article was previously published under Q183247

SYMPTOMS

A Microsoft Visual Basic application may hang during or after a call to the Delete method of a Folder's Messages Collection if the folder contains 100 or more messages.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Collaboration Data Objects (1.2).

MORE INFORMATION

Steps to Reproduce Behavior

NOTE: The following code deletes all existing messages in your Inbox, creates 200 new messages in the Inbox, and then attempts to delete all messages.
   Set OFolder = OSession.Inbox
   OFolder.Messages.Delete
   Subject = "Message"
   Text = "Body for test message "

   For i = 1 To 200
      Subject = Subject & str(i)
      Text = Text & Subject
      Set OMsg = OFolder.Messages.Add(Subject:=Subject, Text:=Text)
      OMsg.Update
      Set OMsg = nothing
   Next i

   ' During or soon after the following call, Visual Basic hangs.
   OFolder.Messages.Delete        ' < -- Hangs here
				

Modification Type:MajorLast Reviewed:6/6/2005
Keywords:kbBug kbCDO120fix kbcode kbfix kbMsg KB183247