Note that there are some explanatory texts on larger screens.

plurals
  1. POVBScript: Lotus Notes autosave attachments with specific extension
    primarykey
    data
    text
    <p>Early, I posted theme "Groovy: autosave attachment with specific extension from Lotus Notes", but couldn't find any solution, so i found different vbscripts and make own. Its works, but now i have a problem: letter doesn't delete after as script autosave attach. I see error: "All objects must be from the same session". I will be grateful for any idea.</p> <pre><code>Dim Session Dim Maildb Dim vw Dim doc Dim Item Dim x Set Session = CreateObject("Lotus.NotesSession") Call Session.Initialize("password") Set Maildb = Session.GetDatabase("SERVER", "mail.nsf") If Not Maildb.IsOpen = True Then Call Maildb.Open End If Set vw = Maildb.GetView("($inbox)") With vw x = 0 ReDim LmailID(x) ReDim HasAttach(x) Set doc = .GetFirstDocument Set Item = doc.GetFirstItem("Body") Do If Item.Type = RICHTEXT Then - here i try take unread message and it doesnt work fileNames = Session.Evaluate("@AttachmentNames", doc) For Each Filename In fileNames If Filename &lt;&gt; "" Then If Right(Filename, 3) = "bch" Then Call doc.Save( False, True, True ) Set NotesEmbeddedObject = doc.GetAttachment(Filename) NotesEmbeddedObject.ExtractFile ("C:\" + Filename) Set reply = doc.CreateReplyMessage( False ) Call reply.replaceItemValue("Subject", "DONE" + subject) Call reply.Send( False ) Set nextDoc = .GetNextDocument(doc) Set doc = nextDoc End If End If Next End If x = x + 1 ReDim Preserve LmailID(x) Set doc = .GetNextDocument(doc) Wscript.Sleep 500 Loop Until doc Is Nothing End With Set Session = Nothing Set vw = Nothing Set doc = Nothing Set Item = Nothing Set Maildb = Nothing </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload