Results 1 to 2 of 2
  1. #1
    Lurker
    Join Date
    Oct 2016
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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" }" } } } }" }

  2. #2
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts
    Cross-posted (and answered) at: http://www.msofficeforums.com/word/3...ce-2007-a.html
    Responses should be posted there.

    For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184
    Windows secrets rules

    [-edit-]
    A second cross-post was entered at:
    https://social.technet.microsoft.com...eld?forum=word
    on October 10, four days after this post, also without any notice.

    To Papote or Rick131 or whatever your name is. Based on your join date of 2010 on the Technet forum and numerous posts there, I believe you are an experienced forum member. Please read both the Windows Secrets Rules and note on cross-posting etiquette (links above).

    These forums only work if we respect one another. Please post a note on each of the forums with a note that you have read those. If you feel an apology is warranted, please give one. If not, please explain your behavior. You should do this in each forum in which you have posted this identical question, especially the ones where you posted it after the question had already been answered.

    I suspect that most people posting on these sites (including me) have cross-posted when they really needed an answer and it didn't seem like they were getting one. They want to get as much input as possible. When I first did it, my attention was drawn to the page on etiquette. Since then, on those occasions when I felt the need to post in multiple forums, I added links to the other places I had posted so that the community (communities) of users could best address my problems. I hope that in the future you will do the same.
    [-end edit-]

    [- second edit - ]
    Another cross-post at http://www.utteraccess.com/forum/ind...wtopic=2039748
    That is a vba forum. It was posted on October 6.
    [- end edit -]
    Last edited by Charles Kenyon; 2016-10-11 at 21:29. Reason: Add notes about second and third cross-posts
    Charles Kyle Kenyon
    Madison, Wisconsin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •