Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    May 2007
    Location
    Perth, Western Australia, Barbados
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Using Sendkeys with the sendmail function (Word 97 SR2)

    Hi,
    Can anybody please help/advise. I am trying to automate the sending of documents using the send to > Mail recipient option from the file menu. I have written a macro that does this, but this stops at the ActiveDocument.sendmail. I have then added sendkeys statement to send out details on the email message. Unfortunately this does not seem to work, the macro works as far as opening the mail message and then stops. I have tried this with Word 2000 and it works!.
    Any ideas, suggestions greatly appreciated.

    Thanks
    Naz <img src=/S/brainwash.gif border=0 alt=brainwash width=15 height=15>

  2. #2
    New Lounger
    Join Date
    May 2007
    Location
    Perth, Western Australia, Barbados
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Using Sendkeys with the sendmail function (Word 97 SR2)

    Hi

    Forgot to mention in my original post: the email client I am using is Outlook express 5.5

    Bye Naz

  3. #3
    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: Using Sendkeys with the sendmail function (Word 97 SR2)

    If I put a SendKeys statement immediately after ActiveDocument.SendMail, Word types my text into the Word document, since the Outlook message is not yet active. Is that what is happening to you? If so, you might want to look at a recent thread either on this board or under VBA concerning making VBA "pause" while another process finishes. Once the other window is open and active, you should be able to use SendKeys, I would think.

Posting Permissions

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