View Single Post
 
Old 03-14-2018, 08:52 PM
Charles Kenyon Charles Kenyon is offline Windows 10 Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,533
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

This is far from a trivial task.
You can either use the Publish Date Document Property Content Control (which you can customize) and repeat it or you can bookmark the control and refer to its results in complex fields.

Here is a copy of one such field, just to give you an idea of the complexity.
{ QUOTE "{ SET " Delay" "14" }
{
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" }" } } } }" }


You would be using a copy of the Publish Date control or a REF field to the bookmark instead of CreateDate in your fields.

Luckily, Paul Edstein has compiled a tutorial that is a Word document with a compendium of such fields that you can copy and change to fit. Be sure to read the introductory material. You can find it here: https://www.msofficeforums.com/word/...-tutorial.html

The reason for using the Publish Date Document Property control instead of your own is explained here: Repeating Data Using Document Properties Content Controls and Other Mapped Content Controls
Reply With Quote