Is there a Word merge code to show next month instead of the current month

I am currently using this field code to get the current month:


Which shows

November 2006

Is there a field code that I can enter to show next months date?


December 2006

I basically need to alter the field to add one month to the current  date, so I guess if its possible it would be something like this:

LVL 30
Who is Participating?

Improve company productivity with a Business Account.Sign Up

David LinkerConnect With a Mentor Commented:
A Word .DOC containing this field is attached here: 
Hi nmcdermaid,

Try this field code:

{ QUOTE { IF { DATE \@ "M"}= 1 "12" "{={DATE \@ "M" }+1}"}/1/{DATE \@ "YYYY"} \@ "MMMM YYYY" \* MERGEFORMAT}

Hope, this is what you were looking for,


nmcdermaidAuthor Commented:
It probably is what I want, but MS Word won't accept it.

In the 'field' dialog box, the OK button is greyed out when I paste that string in.

It isn't greyed out when I just paste DATE in.

Therefore there may be an issue with opening/closing brackets and or quotes? I'm not too familiar with this type of syntax, it may be quicker if you could take another look.

... plus I'm in Australia here so maybe the date format when concatenating the string needs to d/m/y instead of m/d/y
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Anne TroyEast Coast ManagerCommented:
To insert a set of the { } brackets, you must use Ctrl+F9. You cannot copy/paste them.

So, edit the existing merge field by changing it to say QUOTE, then hit space, then Ctrl+F9, then type IF, etc...
For each pair of {} you'll have to use Ctrl+F9 as Dreamboat has said. Your field code should match with string so as to work correctly. For the Date part, I dont' think that will create any problem, give this a try.


nmcdermaidAuthor Commented:
Thanks guys. I gotta run now but I'll try it tommorow, it sounds like what I'm after!
nmcdermaidAuthor Commented:
OK, I've created a field with just "DATE" in it, then I've hit "toggle field codes" and edited it.

Using CTRL-F9 (noting that it inserts BOLDED braces) I have entered the above formula. Then I hit 'toggle field codes' ....

its just showing todays date:


The curious thing is if I flick back to the field code or copy and paste, it changes it to this:

{ QUOTE /1/ \@ "MMMM YYYY" \*}

.. which is a nice suprise after I laboriously typed it in!

Is there a way we can break this into bits to check which segment is causing issues?

I think you are missing some field codes. You'll have to replicate each bit as it is. All the paired curly braces '{ }' denotes field code (you'll have to use Ctrl-F9. Altogether, there are Six field codes). I'm also attaching a zipped word file with above working field code. If you wish, you can copy field code from this document, its working fine.


nmcdermaidAuthor Commented:
Thanks for that I'll give it a try tommorow.
nmcdermaidAuthor Commented:
OK, its almost working except for the position of the month.

Basically its stuck on January because the MMMM format string is picking up the /1/ in the middle. The first number (which is the day in Australian format) is definitely moving along correctly.

Therefore it definitely needs to be in Australian format:

How do I move the /1/ to the front:

for example,

1/4/2007 for an input of March 2006  as opposed to 4/1/2007

I've tried messing with the codes but to no avail.

Thanks for your assistance so far, I'm learning a lot.
Strewth Bruce,
Without getting too involved, in Pommieland our name for the fourth month is April. I guess there's more to Oz than just being excellent at team games.
nmcdermaidAuthor Commented:
LOL Crikey!

But when you add one to the month March becomes April (as per the original question), so I guess we both see these things slightly differently :)

David LinkerCommented:
From a fellow Aussie:

{ QUOTE "1/"{ IF { DATE \@ "M"}= 12 "1" "{={DATE \@ "M" }+1}"}"/"{ IF { DATE \@ "M" }= 12 {={ DATE \@ "yyyy" }+1 {DATE \@ "yyyy"} } \@ "MMMM yyyy" \* MERGEFORMAT}

Note - the original answer while helpful checked for January then made it December - when you need to check for December and make it January.  You also have to increment the year by one if it is December.  I fixed both these errors.

The field codes that keep "disappearing" after you type it in - you need to highlight just the text representing the "disappearing" code and press shift-F9 to make that piece visible as a code instead of it's value

I've also moved the month in to the middle to cope with our Aussie date format :-)
This will give you the answer you're after.  Note that the space is important - especially the space betweeen the = and 12 - which occurs in two places.

nmcdermaidAuthor Commented:
Thats the ticket, thanks for that!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.