Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2004
    Posts
    65

    Question Unanswered: How to open email compose window w/ current Excel doc attached?

    I have a button that, when clicked, should basically ShellExecute() a mailto:xxx@xxx so that the user's default mailer opens a compose window with subject and body prefilled.. but here's the catch... the current Excel sheet in its current state must be pre-attached to the e-mail.

    Is this possible?

    Thanks!

  2. #2
    Join Date
    Dec 2003
    Location
    Östersund Sweden
    Posts
    60
    Hi,

    What e-mailclient do You use?

    Kind regards,
    Dennis
    Kind regards,
    Dennis

  3. #3
    Join Date
    Jan 2004
    Posts
    65
    Outlook. But our clients could be using Outlook Express or some other mailer, we can't hard-code for a specific mail client..

  4. #4
    Join Date
    Dec 2003
    Location
    Östersund Sweden
    Posts
    60
    Hi,

    OK, the bad news is that ShellExecute is a simpel mailprotocol that don´t support attachments.

    See: ftp://ftp.isi.edu/in-notes/rfc2368.txt

    Is MAPI an alternative?

    Otherwise You are forced to use a third-part tool for it.

    Kind regards,
    Dennis
    Kind regards,
    Dennis

  5. #5
    Join Date
    Jan 2004
    Posts
    65
    I'm not sure how we'd use MAPI.

    All I need to do is have a commandbutton open a new mail window with attachments already inserted. But it's sounding like maybe this isn't possible without 3rd party apps? If we DO have to go the 3rd party route, what do you recommend?

  6. #6
    Join Date
    Oct 2003
    Posts
    1,091
    This is just a thought. What about having the macro operate from within Excel rather than Outlook? I think this would make the Excel sheet the automatic attachment.
    old, slow, and confused
    but at least I'm inconsistent!

    Rich
    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

  7. #7
    Join Date
    Jan 2004
    Posts
    65
    Yeah.. I AM working within Excel..that's where the macros are. I know how to get the Excel sheet attached, I think it's SendForReview() or SendMail() or something. Problem is, I also need to allow the user to attach some JPEGs first.. AND I have to set the subject/body to a predetermined block of text (the user does not need to edit it at all).

    See how frustratingly complex this is?

  8. #8
    Join Date
    Oct 2003
    Posts
    1,091
    Okay, I misunderstood. Not unusual for me.

    Just another thought. I had developed a Form in Outlook that included all the addresses plus standard text. I then set up a macro in Outlook and attached to a button on the Outlook toolbar. This allowed the senior managers to click the button, bring up the pre-formatted Outlook message, and all they had to do was manually attach any Excel file. Is this of any help?
    old, slow, and confused
    but at least I'm inconsistent!

    Rich
    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

  9. #9
    Join Date
    Jan 2004
    Posts
    65
    Well, the process here is kind of the opposite..sort of. They're going to be making lots of changes in an Excel sheet, and want a button within the Excel sheet to send off an email with predefined subj/body, and attach the Excel sheet in its current state along with as many JPEGs as they want to attach.

Posting Permissions

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