Link to home
Start Free TrialLog in
Avatar of Bianchi928
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 ?
Avatar of madheeswar
madheeswar
Flag of Singapore image

Option 1: Open each email and forward.
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.
Avatar of Bianchi928
Bianchi928

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
ASKER CERTIFIED SOLUTION
Avatar of madheeswar
madheeswar
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sjef Bosman
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

Open in new window

madheeswar:

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