Bianchi928
asked on
Lotus Notes
I have tagged a few emails from my Inbox which I want to send to my home email.. But instead of having all these emails bunched into one..I want them to reach my home email as seperate ones..How do I do that ?
ASKER
Option 1 is pretty obvious...except when I have nearly 100 emails to do ).
Option 2 Sounds more like it ..but I need the code
Option 2 Sounds more like it ..but I need the code
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Here's the code I use (sometimes):
Sub Initialize
Dim ns As New NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim mailuidoc As NotesUIDocument
Dim subject As String
Set db= ns.CurrentDatabase
Set dc= db.UnprocessedDocuments
Set doc= dc.GetFirstDocument
Do Until doc Is Nothing
subject= doc.Subject(0)
Set uidoc= ws.EditDocument(False,doc,True,"",True,True)
Call uidoc.Forward
Call uidoc.Close
Set uidoc= Nothing
Set mailuidoc= ws.CurrentDocument
Call mailuidoc.FieldSetText("Subject", subject)
Call mailuidoc.FieldSetText("SendTo", "alibaba@40thieves.com")
Call mailuidoc.FieldSetText("EnterSendTo", "alibaba@40thieves.com")
Call mailuidoc.Send
Call mailuidoc.Close
Set mailuidoc= Nothing
Set doc= dc.GetNextDocument(doc)
Loop
End Sub
ASKER
madheeswar:
I have created the Agent...I went in view agent and can see it..How do I test/run it ?
Thanks
Cheers
I have created the Agent...I went in view agent and can see it..How do I test/run it ?
Thanks
Cheers
From the actions menu, you can run the agent. Also, you can use Sjef's code as it also does the same.
Just set the agent to run on selected documents and run it from actions.
Just set the agent to run on selected documents and run it from actions.
ASKER
Awesome
Option 2: Put all the emails in a separate folder and execute some code to forward all the emails to your home address.
Inorder to do #2, you need to have designer to write some code.
Pls let me know which option you are willing to do.