+ Reply to Thread
Results 1 to 9 of 9

Help required to Send Email as per the inputs in the Cell

  1. #1
    Registered User
    Join Date
    07-01-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    66

    Help required to Send Email as per the inputs in the Cell

    Hi Code Champs,

    Below is the code to send emails through a selection in Excel as per http://www.rondebruin.nl/win/s1/outlook/bmail3.htm.

    The likes of To, CC, subject line are hardcoded in the code.

    However, I do not want this hardcoded. Instead, if I update column A1,B1 and C1 with the details of TO, CC and Subject, this would solve my purpose.

    Can you please assist.

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    08-06-2013
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2013
    Posts
    671

    Re: Help required to Send Email as per the inputs in the Cell

    Can you just do this?
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-01-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    66

    Re: Help required to Send Email as per the inputs in the Cell

    Thanks...
    Help Required on 1) I want to preview the email before clicking send. I tried changing the code to .Display at the end, but somehow that is not working.
    2) My email signature is not getting populated which is default in Outlook. Is this possible through some code?

    Appreciate your help.

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Help required to Send Email as per the inputs in the Cell

    Hi, aaron.mendes,

    like you noted the proper command is
    Please Login or Register  to view this content.
    as opposed to
    Please Login or Register  to view this content.
    Insert Outlook Signature in mail.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  5. #5
    Registered User
    Join Date
    07-01-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    66

    Re: Help required to Send Email as per the inputs in the Cell

    Hi Guru,

    Thanks for the link. But since i'm new to VBA, I somehow cannot merge the codes for the outlook signature and also my above code together.
    Also, the .Display code is not working.

    Can you please see this. It would help resolve my query. I have attached my excel for your convenience.
    Attached Files Attached Files

  6. #6
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Help required to Send Email as per the inputs in the Cell

    Hi, aaron.mendes,

    if you copy code from any page please make sure that you copy everything. There is no way in your code that you create an instance of Outlook so the the mail cannot be displayed in Outlook.

    And you should make up your decision about which way for the code to use.

    Ciao,
    Holger

  7. #7
    Valued Forum Contributor
    Join Date
    08-06-2013
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2013
    Posts
    671

    Re: Help required to Send Email as per the inputs in the Cell

    This seems to work for me.
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    07-01-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    66

    Re: Help required to Send Email as per the inputs in the Cell

    Hi Holger,

    In my attached file, there are two macros A) Sending email based on selection in Excel and B) Sending an email that includes Outlook Signature.

    I want to use the first macro which Sends the email based on my selection.

    1)However, It goes without out a signature which is why i need to incorporate the Signature codes in my First Macro Code.

    2) I'm not able to preview the email before sending it. I tried changing the macro but the display function is somehow not working.

    Old Macro

    Please Login or Register  to view this content.
    NEW macro

    Please Login or Register  to view this content.
    And my knowledge on VBA is very limited. Therefore your help is greatly appreciated.
    I'm attaching my excel file for your convenience.
    Attached Files Attached Files

  9. #9
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Help required to Send Email as per the inputs in the Cell

    Hi, aaron.mendes,

    I copied all the code (the procedure as well as the Functions) into a standard module. You would need to make sure that the name of your signature from Outlook is replaced in the constant otherwise no signature would be displayed (we could work around that and build one in HTML if wanted).

    I selected the range of A8:A13 in Sheet1 and started the macro - my version of Excel2007 created and displayed the mail in Outlook.

    Please Login or Register  to view this content.
    Ciao,
    Holger

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Workflow with signatures (if cell=x then send email, if signed then send email)
    By Kate2811 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-25-2014, 05:37 AM
  2. [SOLVED] Nested formula required for two cell inputs and a single cell output
    By titch2k6 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-08-2013, 08:11 PM
  3. Automatic email send
    By mmanalang in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-24-2012, 03:51 AM
  4. Excel Email Macro VBA - How to send an email once all required fields have been fille
    By wallacm2009 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-01-2012, 10:51 AM
  5. Macro required to send a specific email after a date has passed
    By philiasfogg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-12-2009, 05:32 AM

Tags for this Thread

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