Re: Looping through mailbox file - WeOnlyDo Discussion board

Re: Looping through mailbox file (General questions)

by Joey, Monday, March 16, 2009, 03:36 (5523 days ago) @ Joey

I'm trying to insert a header into about 2300 messages. This is a Thunderbird folder. VB keeps crashing, Outlook also. Is it my code or limitations of WodMailbox?
[code]Sub InsertMessageIdHeader()

Dim oMailbox As wodMailboxCom
Set oMailbox = New wodMailboxCom
oMailbox.FileName = C:TestSent
oMailbox.Lock

For Each oMessage In oMailbox.Messages
If oMessage.Headers.Exists( Date ) And _
Not oMessage.Headers.Exists( Message-Id ) Then
oMessage.Headers.Add Message-Id , oMessage.Headers( Date )
End If
Next oMessage
oMailbox.Update
oMailbox.Unlock

End Sub[/code]

Apparently the code tag strips out backslashes. That was C:TestSent , Sent being the file I'm attempting to alter.


Complete thread: