Forwarding a form as email and closing form

Posted on 2006-03-29
Last Modified: 2013-12-18
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");

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!
Question by:rdd265
    LVL 22

    Accepted Solution

    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,
    LVL 22

    Expert Comment

     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,
    LVL 46

    Expert Comment

    by:Sjef Bosman
    Try with
        @Command([Compose]; "Document");

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
    Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    This video discusses moving either the default database or any database to a new volume.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now