G
Guest
I'm using following code to extract certain user properties from post items
located in a public folder. Looks like when user properties are requested
items stay open. When I check the Task Manager, I can see that memory usage
is increasing. After about 100 items my screen starts flashing and I have to
kill Outlook to get out. How can I fix this memory leak?
(This code is located in a message custom form)
Private Sub Export()
Dim itm As Object
For Each itm In ActiveExplorer.CurrentFolder.Items
If itm.MessageClass = "IPM.Post.Change Directive" Then
With itm
strTemp = .UserProperties("MyProperty1").Value & Chr(9) & _
.UserProperties("MyProperty1").Value
WriteOut strTemp
.close olDiscard
End With
Close 1#
End If
Next
End Sub
Private Sub WriteOut(ByVal strTemp As String)
Open "C:\Temp\Export.txt" For Append As 1#
Print #1, strTemp
Close 1#
End Sub
located in a public folder. Looks like when user properties are requested
items stay open. When I check the Task Manager, I can see that memory usage
is increasing. After about 100 items my screen starts flashing and I have to
kill Outlook to get out. How can I fix this memory leak?
(This code is located in a message custom form)
Private Sub Export()
Dim itm As Object
For Each itm In ActiveExplorer.CurrentFolder.Items
If itm.MessageClass = "IPM.Post.Change Directive" Then
With itm
strTemp = .UserProperties("MyProperty1").Value & Chr(9) & _
.UserProperties("MyProperty1").Value
WriteOut strTemp
.close olDiscard
End With
Close 1#
End If
Next
End Sub
Private Sub WriteOut(ByVal strTemp As String)
Open "C:\Temp\Export.txt" For Append As 1#
Print #1, strTemp
Close 1#
End Sub