FIX: Folder.Messages.Delete Hangs Visual Basic

ID: Q183247

The information in this article applies to:

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 version 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

REFERENCES

For additional information about Collaboration Data Objects versus Active Messaging, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q176916
   TITLE     : INFO: Active Messaging and Collaboration Data Objects (CDO)

Additional query words: ActMsg
Keywords          : kbCDO kbCDO110bug kbCDO120fix kbMsg 
Version           : WINDOWS:1.1
Platform          : WINDOWS
Issue type        : kbbug
Solution Type     : kbfix

Last Reviewed: December 14, 1998