+ Reply to Thread
Results 1 to 8 of 8

Send data from Excel in email from specific email account

  1. #1
    Registered User
    Join Date
    12-05-2007
    Location
    Oklahoma
    MS-Off Ver
    2003, 2007
    Posts
    22

    Send data from Excel in email from specific email account

    I have been very successful in using the 1st macro to insert specific data from a spreadsheet into an email and send it. The only problem is that I need to send it from a specific account in Outlook. I found the 2nd macro which works to send from a specific account in Outlook but I am not able to find something similar to work with Excel and integrate with the 1st code. If anyone can help me, this would be more than appreciated!

    1st Macro

    Please Login or Register  to view this content.
    2nd Macro

    Please Login or Register  to view this content.
    Last edited by Leith Ross; 12-05-2007 at 01:51 AM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello eriknokc,

    Welcome to the Forum! Sending email using the ShellExecute API uses the default mailer. You can send your email to multiple recipients, do CC and BCC as well. However, your mail body is limited to 256 characters, and you can't send in HTML. This is fine for short, text only messages. If you need more then Outlook is the better choice.

    I don't know where you found that second macro, but please put it back! It won't do anything because it is incomplete. It would help if you describe in more detail what you want to achieve with the email. Simply saying you want to mix and match isn't very specific.

    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    12-05-2007
    Location
    Oklahoma
    MS-Off Ver
    2003, 2007
    Posts
    22
    Well the 2nd macro worked fine for me, but I guess that doesn't matter.

    This is what I am looking for...

    What do I need to add to the 1st macro is to be able to set the from field of the email to a specific email address/email account?

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello eriknokc,

    You have the variable Email following the "mailTo:" . This is what specifies the email recipient's address. What is the code not doing?

    Sincerly,
    Leith Ross

  5. #5
    Registered User
    Join Date
    12-05-2007
    Location
    Oklahoma
    MS-Off Ver
    2003, 2007
    Posts
    22
    The Email following the "mailTo:" is for the email addresses I am sending to. I need to also specify the email address I am sending from. I have multiple email addresses that I have permission to send from and I need it to come from one specific email address.

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello eriknokc,

    You can only do that from Outlook. A macro can be run from Excel to create the Outlook Application and set up the email and send it. ShellExecute was not designed to perform that security function.

    Sincerely,
    Leith Ross

  7. #7
    Registered User
    Join Date
    12-05-2007
    Location
    Oklahoma
    MS-Off Ver
    2003, 2007
    Posts
    22
    Well thank you for your help and information.

  8. #8
    Registered User
    Join Date
    11-28-2007
    Posts
    57
    I don't know much about this but...

    isn't there a way to set outlook to give a different 'reply' address,
    and if so can that be addressed in your VB.

    Just an idea for a work around...

    This probably doesn't help, no need to sys so, just ignore this if needed.

    later, phil
    Phil
    Technician
    City of Clinton, SC
    SCADA, GIS, Utility Billing, Networking
    I'm doing the best I can with the little bit I know.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1