Manage Learn to apply best practices and optimize your operations.

Quick messenger in Notes

Here is an easy code to reply to your incoming mails without having to open the mail and reply to it. What you need to do is just paste the following code into an action button in the folder ($Inbox) in your mail database.
    Sub Click(Source As Button)
    Dim workspace As New NotesUIWorkspace
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim collection As NotesDocumentCollection
    Dim doc As NotesDocument
    Dim doc2 As NotesDocument
    Dim msgSub As String
    Dim Nattach As Variant
    Dim txt As String
    Dim item As notesitem
    Dim Delt As Integer
    Dim view As notesview

    Set db = session.CurrentDatabase
    Set doc2 = New NotesDocument( db )
    Set view = db.GetView( "($Inbox)" )
    Set collection = db.UnprocessedDocuments
    If collection.count > 1 Then
        Msgbox("you only can reply OneToOne")
    Elseif collection.count < 1 Then
        Msgbox("select a mail to reply to")
    Else
        Nattach = Evaluate("@Attachments", doc)
        If Nattach(0) = 0 Then

            i=1
            Set doc = collection.GetNthDocument( i )
            Set item = doc.GetFirstItem( "Body" )
            txt = item.text
            If Len(txt)> 160 Then
                txt = Left(txt,160)
            End If
            msgSub = workspace.Prompt(PROMPT_OKCANCELEDIT, "Quick MSG", "MSG: " & txt, "", "")
            doc2.Form = "Memo"
            doc2.SendTo = doc.From(0)
            doc2.Subject = Left (msgSub, 10) & " ..."
Arturo Ordieres doc2.Body = msgSub
            If msgSub = "" Then
            Else
                Call doc2.Send( False )
                Delt = workspace.Prompt(PROMPT_YESNO, "Delete", "Do you want to delete this Msg? ", "", "")
                If Delt=1 Then
                    'Call collection.DeleteDocument(doc)
                    Call doc.Remove( True )
                    Call view.refresh
                    Call Workspace.ViewRefresh
                End If
            End If
        End If
    End If
End Sub

Dig Deeper on Domino Resources - Part 5

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close