+ Reply to Thread
Results 1 to 10 of 10

Autofill outlook subject line from excel sheet

  1. #1
    Registered User
    Join Date
    04-26-2020
    Location
    Sydney
    MS-Off Ver
    Office Business 365
    Posts
    6

    Autofill outlook subject line from excel sheet

    Hi guys,

    So i have an excel sheet with 100+ emails and when i click on the email it automatically generates an email with outlook for me to type into, but i want the subject line to be autofilled as well as have a template body message i can then change.

    It's for a construction schedule job, so when im booking in trades to attend to site i want to be able to get the job address (subject line) and have a general message auto populate.

    I'm very new to this so need it explained in very simple terms.

    thanks in advance

  2. #2
    Valued Forum Contributor
    Join Date
    01-14-2013
    Location
    Austria
    MS-Off Ver
    2016 / 2019
    Posts
    339

    Re: Autofill outlook subject line from excel sheet

    you have to look into the code which executes the outlook application.
    there must be somewhere a loop (if you send more than one mail). In this loo you now have to insert also the ".subject = ???" and ??? is your subject you have written somewhere on a worksheet.
    If this does not help then you have to provide a samplke sheet including your mailing code

  3. #3
    Registered User
    Join Date
    04-26-2020
    Location
    Sydney
    MS-Off Ver
    Office Business 365
    Posts
    6

    Re: Autofill outlook subject line from excel sheet

    hi,

    I tried attaching the excel file but wouldnt work.

    I attached a screenshot to explain easier. So when i click on an email i want it to grab the job address (23 greenhorn street Sydney) into the subject line of the email. Is there a macro/vba code for this?

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,335

    Re: Autofill outlook subject line from excel sheet

    See the instructions at the top of the page telling you how to attach your workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    04-26-2020
    Location
    Sydney
    MS-Off Ver
    Office Business 365
    Posts
    6

    Re: Autofill outlook subject line from excel sheet

    hi, now i understand how it works.

    thank you. please find attached
    Attached Files Attached Files

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,335

    Re: Autofill outlook subject line from excel sheet

    That’s why the instructions are there, so that you don’t use the drop-down, which we know doesn’t work.

  7. #7
    Registered User
    Join Date
    04-26-2020
    Location
    Sydney
    MS-Off Ver
    Office Business 365
    Posts
    6

    Re: Autofill outlook subject line from excel sheet

    haha yes now i understand! Hopefully someone is able to help with my query.

  8. #8
    Valued Forum Contributor
    Join Date
    01-14-2013
    Location
    Austria
    MS-Off Ver
    2016 / 2019
    Posts
    339

    Re: Autofill outlook subject line from excel sheet

    I thought you already have a mocro running but you are using a hyperlink which opens outlook.
    There are many samples available if you search the internet and they can be modified easily.

  9. #9
    Registered User
    Join Date
    04-26-2020
    Location
    Sydney
    MS-Off Ver
    Office Business 365
    Posts
    6

    Re: Autofill outlook subject line from excel sheet

    I've been looking online and havent been able to find anything that works, i'm very new to this so i might be doing something wrong. are you able to show me a macro that will work and ill give it another go?

    thanks

  10. #10
    Valued Forum Contributor
    Join Date
    01-14-2013
    Location
    Austria
    MS-Off Ver
    2016 / 2019
    Posts
    339

    Re: Autofill outlook subject line from excel sheet

    searching in Google "excel vba outlook mail with template" i found e.g.
    https://www.datanumen.com/blogs/2-qu...e-outlook-vba/

    I added functionality: use of one or more outlook templates (.xxx.oft). You only have to add the path in the table "tblTemplates". Then you can select the appropriate template via pulldown.
    you can format the templates as you like it. I provided one sample file.
    I changed your data into a table ("tblAddresses"). If you don't like it then simply remove the table, use a Named Range or access the data in a different way.

    If you double click on any cell in column "Supplier / Trade" (connected to event "Worksheet_BeforeDoubleClick") an Outlook mail will be generated according the template. If you do not need/want a template then modify the code and (un)comment the corresponding line
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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. Foreign language or symbols in Outlook subject line when mailed using macro in Excel
    By go3go3go in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-29-2020, 11:26 AM
  2. VBA Code - Extracting Outlook Subject line text into various Excel columns
    By MHamid in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-20-2017, 12:24 PM
  3. [SOLVED] separating outlook subject line into columns
    By spittingfire in forum Outlook Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2015, 10:15 AM
  4. Replies: 8
    Last Post: 05-17-2013, 01:53 AM
  5. Outlook Subject line from Excel Cell reference
    By Shibu.excel in forum Outlook Formatting & Functions
    Replies: 4
    Last Post: 09-06-2012, 03:19 AM
  6. Subject Line Alert - Outlook 2007
    By dreinisch in forum Outlook Formatting & Functions
    Replies: 2
    Last Post: 09-12-2011, 09:43 AM
  7. Changing the Outlook subject line...
    By ChrisMattock in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 01-13-2009, 10:19 AM

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