Este codigo pretende emular un tipo de msn...
consiste en darte la posibilidad
de contestar a tus mails sin necesidad de abrir el propio mensaje haciendo la
comunicacion mucho mas dinamica.
Necesitas poner este codigo dentro de un boton en el folder/carpeta ($Inbox)
codigo:
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("Solo puede contestar a un solo mensaje cada vez")
Elseif collection.count < 1 Then
Msgbox("Seleccione un mensaje al que contestar")
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) & " ..."
doc2.Body = msgSub
If msgSub = "" Then
Else
Call doc2.Send( False )
Delt = workspace.Prompt(PROMPT_YESNO, "Borrar", "Quieres
borrar este mensaje? ", "", "")
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
|
Otros documentos de LotusScript
|