Hi, all experts,
I'm looking for a way to move one Lotus Notes (R5) email from Inbox to another folder (called "Folder1") using VB6. Does anyone know how to do it?
Below are my current codes.
Thanks in advance!!!
==================
Dim NotesSession As Object
Dim NotesDb As Object
Dim NotesDoc As Object
Dim strServerName As String
Dim strUserDb As String
Dim View As Object
Dim vCurrDoc As Object
Dim vRemoveDoc As Object
Dim item As Variant
Dim attch As Variant
Dim vSubject As String
Const vRICHTEXT = 1
On Error GoTo Err
strServerName = "MyServerName"
strUserDb = ""
Set NotesSession = CreateObject("Notes.NotesSession")
Set NotesDb = NotesSession.GETDATABASE(strServerName, strUserDb)
NotesDb.OPENMAIL
Set View = NotesDb.GETVIEW("($Inbox)")
Set vCurrDoc = View.GETFIRSTDOCUMENT
Do While Not (vCurrDoc Is Nothing)
vCnt = vCnt + 1
If vCurrDoc.HASITEM("FailureReason") = True or _
vCurrDoc.HASITEM("Subject") = False Then
'''' HERE I WANT TO MOVE THIS EMAIL TO ABOTHER FOLDER called Folder1..., and go to next email
Loop
==============================
I'm looking for a way to move one Lotus Notes (R5) email from Inbox to another folder (called "Folder1") using VB6. Does anyone know how to do it?
Below are my current codes.
Thanks in advance!!!
==================
Dim NotesSession As Object
Dim NotesDb As Object
Dim NotesDoc As Object
Dim strServerName As String
Dim strUserDb As String
Dim View As Object
Dim vCurrDoc As Object
Dim vRemoveDoc As Object
Dim item As Variant
Dim attch As Variant
Dim vSubject As String
Const vRICHTEXT = 1
On Error GoTo Err
strServerName = "MyServerName"
strUserDb = ""
Set NotesSession = CreateObject("Notes.NotesSession")
Set NotesDb = NotesSession.GETDATABASE(strServerName, strUserDb)
NotesDb.OPENMAIL
Set View = NotesDb.GETVIEW("($Inbox)")
Set vCurrDoc = View.GETFIRSTDOCUMENT
Do While Not (vCurrDoc Is Nothing)
vCnt = vCnt + 1
If vCurrDoc.HASITEM("FailureReason") = True or _
vCurrDoc.HASITEM("Subject") = False Then
'''' HERE I WANT TO MOVE THIS EMAIL TO ABOTHER FOLDER called Folder1..., and go to next email
Loop
==============================