#1
|
|||
|
|||
Adding a 1 day to a Date Merge Field
I have a merge variable that is formatted as a date in Word. I want that date to show as one day later.
If the date shows as 12/05/2016, I want it to show as 12/06/16. The merge variable I am working with looks like this { DOCVARIABLE MasterAccountMerge.Policy.Policy.Detail.PolExpDate *1*20 } What do I need to add to accomplish this? Any help is much appreciated. |
#2
|
||||
|
||||
A DOCVARIABLE field is not a MERGEFIELD. That said, to see how to do this and just about everything else you might want to do with dates in Word without VBA, 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 In particular, look at the item titled Calculate a day, date, month and year, using n days delay. Do read the document's introductory material. Do note that a VBA solution (if that's what you really want) wouldn't be able to output the results in the same space as the DOCVARIABLE field - it could read the DOCVARIABLE's value directly (without the need for the field), but would need, say, a bookmark as the output destination.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
date format, word vba |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Date field - future date calculation + only business days | neon4 | Word | 7 | 01-21-2016 02:21 PM |
Excel pivot table with a DATE value field for some reason stops at a certain date | angie450 | Excel Programming | 2 | 08-19-2014 08:50 AM |
Adding text before a date merge field AND fomatting date as well | NikkiR | Mail Merge | 1 | 08-06-2014 07:18 PM |
Date field inserting merge date in blank field | Lesley | Mail Merge | 5 | 09-30-2013 01:49 AM |
Mail merge will not format date field generated by Excel IF statement | borntorun75 | Mail Merge | 3 | 12-16-2011 06:28 AM |