Re: Memory does not decrease
- From: "Josef" <Josef@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 14 Feb 2006 05:11:28 -0800
Michael,
I need to programmatically export items (Outlook Custom Forms, user defined
fields; 14500 items per day) to Access 2003.
I need OL2003 VBA code because I must avoid security warnings when I use
properties that are blocked by the Outlook 2003 object model guard. I mustn't
use Redemption ... (very rescrictive Security Policy)
Increase the size of PC virtual memory paging file atc. no more.
A response to my question (please see Subject: Out of Memory problem) helped
me to increase the number of items I could iterate before running out of
memory.
This (belowe) code is in agreement (? - I don't know how else) with a
support "An alternative is to call your loop procedure repeatedly etc."
Sorry, can you help me please?
Josef
"Michael Bauer" wrote:
Am Mon, 13 Feb 2006 02:54:57 -0800 schrieb Josef:.
Josef,
please, what is that good for?
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --
The memory used by my trial code - subroutine doDBa (please see below -expected
OL2003 VBA; this reading data lives on my PC) does not decrease as
after it runs an incremental using by my sub rep (Task Manager: if e = 1Mem
Usage is 327684, if e = 2 Mem Usage is 430760 etc.) If e = 100 I get thewill
error message: Out of Memory.
Please, how do I have to change my code (preferred OL2003 VBA) so that
finish correctly without error message Out of memory.
Public Sub rep()
e = 2
For j = 1 To e
doDBa
Next
End Sub
Public Sub doDBa()
Dim olApp As Outlook.Application
Dim olNS As Outlook.NameSpace
Dim olInbox As Outlook.MAPIFolder
Dim colItems As Outlook.Items
Dim olItem As Outlook.MailItem
Set olApp = Application
Set olNS = olApp.GetNamespace("MAPI")
Set colFolders = olNS.Folders
Set olMB = colFolders.Item("Osobní složky")
Set colFoldersMB = olMB.Folders
Set olFolderMB = colFoldersMB.Item("Buffer")
Set colItems = olFolderMB.Items
Set olItem = colItems.GetFirst
i = 0
Do While Not olItem Is Nothing
i = i + 1
If i = 100 Then
Exit Do
End If
Debug.Print i & " " & olItem.SenderName & " " & olItem.ReceivedTime
olItem.Delete
Set olItem = colItems.GetNext
Loop
Set olApp = Nothing
Set olNS = Nothing
Set colFolders = Nothing
Set colFoldersMB = Nothing
Set olFolderMB = Nothing
Set colItems = Nothing
Set olItem = Nothing
MsgBox i
End Sub
- Follow-Ups:
- Re: Memory does not decrease
- From: Michael Bauer
- Re: Memory does not decrease
- References:
- Memory does not decrease
- From: Josef
- Re: Memory does not decrease
- From: Michael Bauer
- Memory does not decrease
- Prev by Date: Re: Memory does not decrease
- Next by Date: Re: Creating a com Addin for office 2000
- Previous by thread: Re: Memory does not decrease
- Next by thread: Re: Memory does not decrease
- Index(es):
Relevant Pages
|