Results 1 to 3 of 3

Thread: sendmail button in a word document

  1. #1
    VBAX Newbie
    Joined
    Oct 2007
    Posts
    1
    Location

    sendmail button in a word document

    Hello,

    I'm having a hard time to built a button that would send an email automaticaly to a pre-define list included in the code.
    Here is what I've done so far:

    Private Sub CommandButton1()
    ActiveDocument.SendMail
    With ActiveDocument.MailEnvelope.Item
    .Recipients.Add "scorney@isp.com"
    .Recipients.Add "scorney@isp.ca"
    .Subject = "I Approved the MOP."
    End With
    End Sub

    I've changed the security to Medium and it work once but then nothing...
    It copied the word file into the email and I could put .send to send it automaticaly without having anyone editing the email before send...

    What do you think it can be the problem ?
    Thanks,
    Sylvain

  2. #2
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,710
    Location
    Please mention it when you have cross-posted. You essentially have this same request at Tek-Tips.

    BTW: you should probably put the SendMail instruction at the end.

  3. #3
    VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,321
    Location
    Click here for an explanation of cross-posting
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

Posting Permissions

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