Forwarding a form as email and closing form

I have a form I want to be able to forward as an email.  I want the user to open the form, click a button, and have the form placed in an email.  I also want to close the form that was opened, so that when the user finishes sending the email, he will not see the form that was originally opened.  Here's what I have:

@command([compose]; "myform");
@command([mailforward]);
@command([closewindow])

Problem is that the closewindow command closes the forwarded email, not the original form.  I can't find a way around this, and a solution is urgently needed.  Please help!
rdd265Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mbonaciCommented:
Hi rdd265,
use LotusScript:

Sub Click(Source As Button)
    Dim w As New NotesUIWorkspace
    Dim uidoc As NotesUIDocument
   
    Set uidoc = w.CurrentDocument
   
    Call uidoc.Forward
    uidoc.Document.SaveOptions = "0"
    Call uidoc.Close
   
End Sub


Hope this helps,
Marko
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mbonaciCommented:
rdd265,
 If you need the action to create the new doc itself then replace this line:

    Set uidoc = w.CurrentDocument

with this one:

    Set uidoc = w.ComposeDocument( "", "", "myform" )

Hope this helps,
Marko
0
Sjef BosmanGroupware ConsultantCommented:
Try with
    @Command([Compose]; "Document");
    @PostedCommand([MailForward]);
    @Command([CloseWindow])
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.