Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 213
  • Last Modified:

Need this Script tweeked abit to get me to where I need to be....

Here is my current Lotus Script....
Right now the document comes into my mail and is picked up by this agent.
It is then put into the "New Summary" Folder( and saved there).
I need it to be not only put into "New Summary" but then removed from my mailbox.
Right now when I remove it from mailbox, it gets removed from "News Summary" as well.

 

Sub Initialize
      Dim session As New Notessession
      Dim db As notesdatabase
      Set db = session.currentdatabase
      Set doccoll = db.unprocesseddocuments
      Set doc = doccoll.getfirstdocument
      Dim fileNum As Integer
      If Not doc Is Nothing Then
            fileNum% = Freefile()
            Set rtitem = doc.GetFirstItem( "Body" )
            If ( rtitem.Type = RICHTEXT ) Then
                  plainText = rtitem.GetFormattedText( False, 9999 )
            End If
' get a file number for the file
            fileNum = Freefile
' open the file for writing
            Open "c:\plane.txt" For Output As fileNum
' write the formatted text to the file
            Print #fileNum, plainText
' close the file
            Close #fileNum
      End If
      Call doc.putInFolder("News Summary")
      'Call doc.remove(True)      
End Sub
0
rbender
Asked:
rbender
1 Solution
 
qwaleteeCommented:
I think what you mean is: You want it removed from you INBOX, not your MAILBOX.  The whole of your mail folders TOGETHER are all part of your mailbox.

     End If
     Call doc.putInFolder("News Summary")
     doc.removeFromFolder "($Inbox)"
End Sub
0
 
Sjef BosmanGroupware ConsultantCommented:
Hi rbender,

The Inbox is a Folder as well, not a View, so you should use RemoveFromFolder.

Cheers!
   Sjef
0
 
rbenderAuthor Commented:
yep...that does it.
Thanks.

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now