+ Reply to Thread
Results 1 to 4 of 4

Auto Calculate Date based off Mail Merge Data

  1. #1
    Registered User
    Join Date
    01-30-2015
    Location
    California, USA
    MS-Off Ver
    2003, 2007, 2010 & 2013
    Posts
    20

    Auto Calculate Date based off Mail Merge Data

    Does anyone know if it is possible to set up a mail merge to auto-calculate a date?

    Example
    I have the following line:

    Renewal Policy Period: 7/15/2015 to "ToDate"

    I would like "ToDate" to automatically calculate 1 year from the 7/15/2015 (7/15/2015 will pull from an excel sheet via mailmerge, and this date will ALWAYS be different, but the "ToDate" will always be 1 year after this field).

    I do understand it would be easier to add it to excel and just have it as another merge field, but for this particular task, that's not an option.

    Thanks

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Auto Calculate Date based off Mail Merge Data

    Hi mkn95u0,

    Mail Merge itself cannot calculate the date to the best of my knowledge.

    However, by using an Excel File to control the Mail Merge, Excel can edit the Word document to do what you want. I have created two different scenarios:
    a. Automated Mail Merge then automated date modification (one button press).
    b. Automated Date modification of an existing Word file.

    Please note that the ONLY date format supported by both of these scenarios is m/d/yyyy per your example.

    In addition your text must be EXACTLY of the form
    Renewal Policy Period: 7/15/2015 to "ToDate"
    for date replacement to work.

    See the attached zip file which performs scenario a. above and contains:
    a. LJMOpenWordMailMerge5.xls - Master File that controls the Mail Merge
    b. LJMMailMergeData5.xls - Sample Mail Merge Excel Data File
    c. LJMMailMerge5.doc - Mail Merge Word File

    Suggested implementation:
    a. Download and extract the 3 files into the same folder.
    b. Open file LJMOpenWordMailMerge5.xls.
    c. 'Left Click' the Brown Shape to put the correct paths and file names for the default data files.
    d. 'Left Click' the top left Yellow Shape to Perform the Mail Merge and date replacement.
    e. If my files run successfully, put your (paths an) file names on line 25 and 27.

    Lewis
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Auto Calculate Date based off Mail Merge Data

    See the attached zip file which replaces text only. The zip file contains:
    a. LJMMicrosoftWordReplaceText.xls - Excel File that replaces the text in the Word file.
    b. LJMMicrosoftWordReplaceText.doc - Sample Word File

    The text must be EXACTLY of the form
    Renewal Policy Period: 7/15/2015 to "ToDate"
    for date replacement to work.

    Suggested implementation:
    a. Download and extract the 2 files into the same folder.
    b. Open file LJMMicrosoftWordReplaceText.xls.
    c. 'Left Click' the Brown Shape to put the correct path and file name for the default data file.
    d. 'Left Click' the top left Yellow Shape to Perform the date replacement.
    e. If my file runs successfully, put your (path an) file name on line 28.

    Lewis
    Attached Files Attached Files

  4. #4
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,838

    Re: Auto Calculate Date based off Mail Merge Data

    Yes, you can do date calculations in a mailmerge!

    To see how to do just about everything you might want to do with dates in Word, check out my Microsoft Word Date Calculation Tutorial, at:
    http://windowssecrets.com/forums/sho...ation-Tutorial
    or:
    http://www.gmayor.com/downloads.htm#Third_party
    Do read the document's introductory material.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

+ 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. mail merge issues: data source locked & error in cell with a date in it
    By eilersdunn in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 01-16-2014, 04:18 PM
  2. Mail Merge/ Form Auto Fil
    By lukereed18 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 11-16-2012, 02:43 PM
  3. Replies: 0
    Last Post: 11-03-2012, 09:10 PM
  4. Macros or mail merge to select data based on critieris, end result of letters.
    By Nicklebach in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-24-2012, 05:19 PM
  5. Send Mail Merge Auto-Emails based on date
    By Phillycheese5 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-17-2005, 11:40 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