+ Reply to Thread
Results 1 to 5 of 5

Populating mail message with information in Excel

  1. #1
    Registered User
    Join Date
    10-12-2019
    Location
    Poland
    MS-Off Ver
    2010
    Posts
    6

    Populating mail message with information in Excel

    Hi,

    I have an Excel file with e-mails (F2: till column is populated) and mail templates (J2: till column is populated).

    I am trying to create macro, which will:
    1. open Outlook new message,
    2. copy mail from F2 in TO: section
    3. copy mail template from J2 in mail content
    4. add subject with specified content "xxx"

    Once I run the macro, I would like to have new mail message for each row.
    Macro should go until the column F is populated.

    Can you please help me with that?

    Regards,
    Jakub
    Last edited by cosiek; 10-13-2019 at 09:49 AM.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    2013 / 2016 / 365
    Posts
    6,981

    Re: Populating mail message with information in Excel

    This will go better with sample workbook. I already have code to do what you want. It is a matter of passing the right parameters to it.

    Welcome to the forum

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    10-12-2019
    Location
    Poland
    MS-Off Ver
    2010
    Posts
    6

    Re: Populating mail message with information in Excel

    Thank you.

    Please find attached the file. Let me know if still it is not clear.

    It is populated with example info. I would like now, using the macro, be able to copy proper fields (as mentioned in previous post) and paste in the Outlook message.

    Each row should have seperate mail with the same subject let's say 'xxxx'.

    Let me know if sth is still not clear.

    Regards,
    Jakub
    Attached Files Attached Files

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    2013 / 2016 / 365
    Posts
    6,981

    Re: Populating mail message with information in Excel

    Here is the program. The code in ModMailer is set up to mail the parameters passed to it. It is set up to display the mail messages but NOT send them. I have it set up this way so I can test without actually sending mail. To get it to send mail automatically change the following:
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    In other words, move the single quote from in front of .Send and put it in front of .display.

    I also made the information on sheet Arkusz1 into an Excel table. Excel tables have many advantages (http://www.utteraccess.com/wiki/Tables_in_Excel) the one I use here is that they are easy to loop through.

    I have some suggestions and will help you with them. Make column J part of the table. Also I can customize the "template" to include the person's name if you wish. Also you can put subject in the table so each line has its own subject that can also be customized. Let me know if you would like to make these changes. This is easy to code.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-12-2019
    Location
    Poland
    MS-Off Ver
    2010
    Posts
    6

    Re: Populating mail message with information in Excel

    Thank you very much. It was exactly what I needed.
    In case of any questions, will reach you.

    Regards,
    Jakub

+ 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