Here is what I need to do:On a form, we need a button to foward document to predefined mail address.
-
User edit document first, then foward document content to the mail address. Then close the document without saving it.
-
The button should send out mail and document without prompt user a window to ask save or not.
I wrote this scipt. But the email I got is blank. No content of document included. Please help ! What is wrong with the script?
Sub Click(Source As Button)
Dim session As New NotesSession
Dim ws As New NotesUIWorkspace
Dim db As NotesDatabase
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim forward As NotesUIDocument
Dim forwarddoc As NotesDocument
Dim SendTo As String
Set db = session.CurrentDatabase
Set uidoc = ws.CurrentDocument
Set doc = uidoc.Document
Call uidoc.Forward
SendTo = "Jordan Guo"
Set forward = ws.CurrentDocument
Set forwarddoc = forward.Document
Call forwarddoc.Send(False, "Jordan Guo")
forwarddoc.SaveOptions="1"
Call forward.Close
Msgbox "Document has been sent to "+SendTo,0+64+0,"Send successfully . Please close the form without saving it."
doc.SaveOptions="0"
Call uidoc.Close
End Sub