Add "FW:" to your mail forwarding

All mail clients have "FW:" when forwarding mails as a convention. Now notes has it too.

All mail clients have "FW:" when forwarding mails as a convention. Now notes has it too.

You can put this code in an action button with in your inbox folder and your Memo form.

 Sub Click(Source As Button) ? ? ? ?Dim session As New NotesSession ? ? ? ?Dim workspace As New NotesUIWorkspace ? ? ? ?Dim db As NotesDatabase ? ? ? ?Set db=session.currentdatabase ? ? ? ?Dim uidoc As NotesUIDocument ? ? ? ?Dim doc As NotesDocument, doc2 As NotesDocument ? ? ? ?Set uidoc = workspace.CurrentDocument ? ? ? ?If Not (uidoc Is Nothing) Then ? ? ? ? ? ? ? ?Set doc = uidoc.Document ? ? ? ?Else ? ? ? ? ? ? ? ?Set collection = db.UnprocessedDocuments ? ? ? ? ? ? ? ?For i = 1 To 1 ? ? ? ? ? ? ? ? ? ? ? ?Set doc = collection.GetNthDocument( i ) ? ? ? ? ? ? ? ?Next ? ? ? ?End If ? ? ? ?Const NotesMacro$ = "@Replacesubstring(sendto;'CN=':'/O=CST@CST';'':'')" ? 'replace CST with your Organization name. ? ? ? ?st = Evaluate(NotesMacro$, doc) ? ? ? ?Const NotesMacro2$ = "@Replacesubstring(copyto;'CN=':'/O=CST@CST';'':'')" ? ?'replace CST with your Organization name. ? ? ? ?Cc = Evaluate(NotesMacro2$, doc) ? ? ? ?Const NotesMacro3$ = "@Replacesubstring(from;'CN=':'/O=CST@CST':'/O=CST';'':'':'')" ? ?'replace CST with your Organization name. ? ? ? ?FR=Evaluate(NotesMacro3$, doc) ? ? ? ?Set itemA = doc.GetFirstItem( "Body" ) ? ? ? ?Set db = session.CurrentDatabase ? ? ? ?Set doc2 = New NotesDocument(db) ? ? ? ?Set st = New NotesItem( doc2, "st", st ) ? ? ? ?Set cc = New NotesItem( doc2, "cc", Cc ) ? ? ? ?doc2.Subject = "FW: "+ Cstr(doc.subject(0)) ? ? ? ?Set item2 = itemA.CopyItemToDocument( doc2, "Body2" ) ? ? ? ?Set item3 = New NotesRichTextItem( doc2 , "Body" ) ? ? ? ?Set richStyle = session.CreateRichTextStyle ? ? ? ?richStyle.FontSize = 8 ? ? ? ?richStyle.NotesColor = COLOR_DARK_MAGENTA ? ? ? ?Call item3.AppendStyle(richStyle) ? ? ? ?Call item3.AppendText( "----- Forwarded by "+session.commonusername+" on "+ Now+"-----" +Chr(10)+Chr(10) ) ? ? ? ?If doc.hasitem("copyto") And doc.hasitem("sendto") Then ? ? ? ? ? ? ? ?Call item3.AppendText("From: "+FR(0)+" On:"+Cstr(doc.PostedDate(0))+Chr(10)+"To: "+st.text+Chr(10)+"Cc: "+cc.text+Chr(10)+Chr(10)+"Subject: "+doc.subject(0)+Chr(10)+Chr(10)) ? ? ? ?Elseif doc.hasitem("sendto") Then ? ? ? ? ? ? ? ?Call item3.AppendText("From: "+FR(0)+" On:"+Cstr(doc.PostedDate(0))+Chr(10)+"To: "+st.text+Chr(10)+"Cc: "+Chr(10)+"Subject: "+Chr(10)+doc.subject(0)+Chr(10)+Chr(10)) ? ? ? ?Else ? ? ? ? ? ? ? ?Call item3.AppendText("From: "+FR(0)+" On:"+Cstr(doc.PostedDate(0))+Chr(10)+"To: "+Chr(10)+"Cc: "+Chr(10)+"Subject: "+Chr(10)+doc.subject(0)+Chr(10)+Chr(10)) ? ? ? ?End If ? ? ? ?Call item3.AppendRTItem( item2 ) ? ? ? ?richStyle.FontSize = 8 ? ? ? ?richStyle.NotesColor = COLOR_DARK_MAGENTA ? ? ? ?Call item3.AppendStyle(richStyle) ? ? ? ?Call item3.AppendText(Chr(10)+"___________________End Of Forwarded Msg_______________________________________________________________________ ;-)>" ) ? ? ? ?doc2.saveoptions="1" ? ? ? ?Call doc2.Save( False, True ) ? ? ? ?Set uidoc = workspace.EditDocument( True, doc2 ) ? ? ? ?flag = doc2.remove( True ) End Sub
This was last published in November 2001

Dig Deeper on Domino Resources - Part 2

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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 ...

SearchEnterpriseLinux

SearchDataCenter

SearchExchange

SearchContentManagement

Close