none
Insert previous month and year in word 2013 RRS feed

  • Question

  • Hello,

    Currently i have  { DATE  \@ "MMMM yyyy" } in a 2013 Word document - it writes current month and year.

    I am looking for a date that writes last month and year, and every time I open the document to update itself like the above formula currently does.

    I look forward to your replies.

    Friday, September 5, 2014 9:56 AM

Answers

  • Try a field coded as:

    {QUOTE "{=MOD({DATE \@ MM}+10,12)+1}-{=INT({DATE \@ yyyy}+({DATE \@ M}-2)/12)}" \@ "MMMM yyyy"}

    Note: The field brace pairs (i.e. '{ }') for the above example are created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message. Nor is it practicable to add them via any of the standard Word dialogues.


    Cheers
    Paul Edstein
    [MS MVP - Word]

    Saturday, September 6, 2014 1:04 AM

All replies

  • Date calculations in Word are complicated, but it's possible. See Word MVP macropod's tutorial DateCalc.zip, available from the Third party downloads section in Downloadable files on Graham Mayor's website. Make sure that you read the introductory notes carefully.

    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Friday, September 5, 2014 10:06 AM
  • Try a field coded as:

    {QUOTE "{=MOD({DATE \@ MM}+10,12)+1}-{=INT({DATE \@ yyyy}+({DATE \@ M}-2)/12)}" \@ "MMMM yyyy"}

    Note: The field brace pairs (i.e. '{ }') for the above example are created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message. Nor is it practicable to add them via any of the standard Word dialogues.


    Cheers
    Paul Edstein
    [MS MVP - Word]

    Saturday, September 6, 2014 1:04 AM