Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Mar 2003
    Location
    Toronto, Canada
    Posts
    101
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Attaching a form to an e-mail (2002)

    I want to be able to click a button and have the button just to an e-mail message with the form attached. I think it would need some VB code. Am I correct? If so do anyone have code I could use?

  2. #2
    Gold Lounger Rebel's Avatar
    Join Date
    Jul 2001
    Location
    Canada
    Posts
    3,024
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Attaching a form to an e-mail (2002)

    Insert>Field>MacroButton>FileSendMail. When you double click on the button (field) that you have created, your email program opens with the current document attached. Then just a matter of entering the address and sending.
    John
    A Child's Mind, Once Stretched by Imagination...
    Never Regains Its Original Dimensions

  3. #3
    Lounger
    Join Date
    Apr 2003
    Location
    Medina, Ohio, USA
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Attaching a form to an e-mail (2002)

    Maybe your question is more complicated than this but wouldn't this work?

    Right click your toolbar
    Choose Customize
    In the Commands window, pick the category File, then find the command Mail Recipient (as attachment) drag that to your toolbar.

    That will create a new email message and attach whatever document is currently open to the message.

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Attaching a form to an e-mail (2002)

    I have used MacroButton fields in protected forms, and they're a bit twitchy. If the user's slow on the double-click, the selection slides off into the next or nearest form field. Still, it's a simple way to go. The control toolbox includes other buttons that might activate on a single click, and you could try wiring that to run the Word command John (Rebel) mentions in the above post.

  5. #5
    Gold Lounger Rebel's Avatar
    Join Date
    Jul 2001
    Location
    Canada
    Posts
    3,024
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Attaching a form to an e-mail (2002)

    As Jefferson suggests, a Command Button might be the better choice. Create the button from the Controls Toolbar and then attach this code:

    Private Sub CommandButton1_Click()
    ActiveDocument.SendMail
    End Sub
    John
    A Child's Mind, Once Stretched by Imagination...
    Never Regains Its Original Dimensions

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •