Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-15-2016, 02:27 PM
Zmorgan44 Zmorgan44 is offline Adding a 1 day to a Date Merge Field Windows 10 Adding a 1 day to a Date Merge Field Office 2016
Novice
Adding a 1 day to a Date Merge Field
 
Join Date: Mar 2016
Posts: 1
Zmorgan44 is on a distinguished road
Default 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.
Reply With Quote
  #2  
Old 03-15-2016, 02:58 PM
macropod's Avatar
macropod macropod is offline Adding a 1 day to a Date Merge Field Windows 7 64bit Adding a 1 day to a Date Merge Field Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply

Tags
date format, word vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a 1 day to a Date Merge Field 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
Adding a 1 day to a Date Merge Field Mail merge will not format date field generated by Excel IF statement borntorun75 Mail Merge 3 12-16-2011 06:28 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:14 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft