I want a Word date field code to list the previous month

S

Suzanne

For example, if the month is "December", I want the field code to show
"November"

Thanks -- Suzanne
 
T

Tony Jollans

This isn't VBA but here is a field code which should do it (if I type it
correctly :))

{ Quote { = { If { Date \@ "MM" } = 1 12 { = { Date \@ "MM" } - 1 } }* 100 +
1 \# "0000/00/00" } \@ "MMMM" }

with all braces entered via Ctrl+F9
 
J

Jean-Guy Marcil

Tony Jollans was telling us:
Tony Jollans nous racontait que :
This isn't VBA but here is a field code which should do it (if I type
it correctly :))

You certainly did!
Very clever field code!

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
T

Tony Jollans

Merci, Jean-Guy!

--
Enjoy,
Tony


Jean-Guy Marcil said:
Tony Jollans was telling us:
Tony Jollans nous racontait que :


You certainly did!
Very clever field code!

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top