Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying an email to a folder during the send

Status
Not open for further replies.

Alan327

Programmer
Sep 22, 2008
4
0
0
US
I am trying to copy an email to a folder when it is sent. The email can be generated by a button on a form or by a scheduled agent. The folder name will be derived from the document that is open when the email is sent.

To test the button generated version, I created a folder “MailFolder” on my desktop. The following code runs without error but the folder is still empty.

Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Set uidoc = ws.CurrentDocument
Set doc = uidoc.Document
doc.SMTPOriginator = doc.From(0)
doc.Principal = doc.From(0)
Call ws.RefreshParentNote
Call doc.PutInFolder( "C:\Documents and Settings\tars1\Desktop\MailFolder" ) <-----------------------
Call uidoc.Send
Call uidoc.Close

I am relatively new to Notes so please be specific. We are on 7.0.

Thanks,
Alan
 
I don't see any save of the document.

I think you should add a Call doc.save(false,false) after the doc.PutInFolder command.

Pascal.

I've got nothing to hide, and I'd very much like to keep that away from prying eyes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top