Hi Dimirty,
Man, thanks for that!
This worked:
session.MAPIOBJECT = oNS.MAPIOBJECT
(now it totally makes sense)
Now i've got stuck on the next part!
In this app, after login, i create a new folder: rootscanned(date and
time)
and place the redemption mailitems one by one in that folder... simple
right?
When I used the session.LogonExchangeMailbox(MailBoxName, Server) I
could execute the move however now I can not.
...
session.MAPIOBJECT = oNS.MAPIOBJECT
Dim ScanFolder As Redemption.RDOFolder
Dim DateAndTimeNOW As String
DateAndTimeNOW = Now()
ScanFolder =
session.Stores.DefaultStore.IPMRootFolder.Folders( "Scanned").Folders.Add(DateAndTimeNOW)
Dim FolderItemsRED As Redemption.RDOFolder
FolderItemsRED = session.GetDefaultFolder(6)
Dim MailTo As Redemption.RDOMail
For i = 1 To FolderItemsRED.Items.Count
MailTo = FolderItemsRED.Items(i)
MailTo.Move(ScanFolder)
next i
....
the app dies on: MailTo.Move(ScanFolder)
please disregard the fact that when the "i' gets to
(FolderItemsRED.Items.Count/2) that the app will break.
this is because items are getting moved to another folder so the "i"
reference will go above the actual count. I have another more complex
routine that handles that issue but in this case I have shortened it
for the purpose of clarity and getting to the bottom of why does the
app break on:
MailTo.Move(ScanFolder).
please help
--
mirzoni
------------------------------------------------------------------------
mirzoni's Profile:
http://www.officehelp.in/member.php?userid=5392
View this thread:
http://www.officehelp.in/showthread.php?t=1277781
Posted from -
http://www.officehelp.in