View Single Post
 
Old 10-06-2016, 12:55 PM
Papote Papote is offline Windows 10 Office 2013
Novice
 
Join Date: Oct 2016
Posts: 2
Papote is on a distinguished road
Default Create Field That Displays Date+30, Office 2007

I am trying to create a field that when the Word file is opened automatically displays the current date + 30 days in the format 11/04/2016.
I have looked into the non-trivial field format but it doesn't display anything:

Code:
{ QUOTE "{ SET " Delay" "30" }
{  SET "DaysInMonth" { IF { CreateDate \@ "MM" } <> 2 
{  = ROUND(30.575*{ CreateDate \@ "MM" },0)-
ROUND(30.575*{ = { CreateDate \@ "MM" } -1 },0) }
{  IF {  = MOD( { CreateDate \@"yy" } , 4 ) } > 0 "28" "29" } } }
{ SET "NextMonth" {  IF {  CreateDate \@ "MM" } = 12 "1/97" 
"{ = {  CreateDate \@ "MM" } + 1 }/97 } }
{  IF {   = {  REF "Delay" } + { CreateDate \@ "dd" } } <= { REF"DaysInMonth" }
{ CreateDate \@ "MMMM { = {  REF "Delay" } + { CreateDate \@ "dd" } }, yyyy"}{ QUOTE { NextMonth \@ "MMMM" } 
{ = { REF "Delay" } + { CreateDate \@ "dd" } - { REF"DaysInMonth" } }, 
{ IF { CreateDate \@ "MM" } <> 12 { CreateDate \@ "yyyy" }
{ CreateDate \@ "{ = 1 + { CreateDate \@ "yyyy" } \# "xxxx" }" } } } }" }
Reply With Quote