Formula Calculation in "WORD"??

  Simsy 18:55 07 Apr 2005

I know this can be easily done using Excel, but I wonder if it can be done in “Word”

I'm helping someone with a CV. Near the top I have a Date of Birth. Nearby I have the current age, in years.

What I have in mind is to automatically display the age in years, (calculated using the typed in DOB and the “TODAY”, or “NOW” function), when the file is opened. Hence opening it a year later would increase the age by a year.

I thought that it could possibly be achieved using a formula in a table, or using fields, but I can't fathom it, and suspect it can't be done.

Can anyone show me otherwise, using whatever method.

I don't want to go via another file, (such as an Excel file and mail merge), I want it all contained within the Document.

A macro on auto open I'd be interested in, though this isn't the preferred option.

Thanks in anticipation... even if it's only to put me out of my misery!



  Forum Editor 19:13 07 Apr 2005

is this what you mean?

click here

  Simsy 19:35 07 Apr 2005

that's EXACTLY what I'm after. Unfortunately, I'm not all that familiar with fields, and I'm not sure how to enter this.

There appears to be a reference to it being 2 fields.

Can anyone "walk" me through it? Do I need 2 fields?

Many thanks FE.



  Simsy 19:42 07 Apr 2005

that this will do what I want. I don't even need to include the DOB from elswhere; I just bult it into the field.

I just can't get the syntax correct, and keep getting "Syntax error"

I'm doing the following;

Insert>Field>Equations and Formulas

Choosing "=(Formula)"

The box for the field code already has an equal sign in.

What next?

Thanks in anticipation.



  pauldonovan 20:57 07 Apr 2005

You can either hard-code your birthdate or define a bookmark (highlight the birthdate in the doc and do Insert, Bookmark and give it a name - BirthDate in my example below:

Instead of doing Insert>Field

Go to where you want in the doc and do CTRL+F9

This should give you a curly brace field like:


(but it'll be gray)

Start typing the formula below out, but every time you get to a new formula, I think it needs to be a proper word formula, not just a brace symbol so hit CTRL+F9 each time you get to a set of curly braces, then type in what's inbetween. The full formula with bookmark is this:

{ = INT({DATE \@ "yyyy" } +{ DATE \@ "M" } / 12 + { DATE \@ "d" } / 365.25 - { BirthDate \@ "yyyy" }- { BirthDate \@ "M" } / 12 - { BirthDate \@ "d" } / 365.25) }

It is a bit fiddly and there might be an easier way to turn that into a formula, but CTRL+f9 is the only way I could find about...

  Simsy 11:40 08 Apr 2005

I seem to have got that working here at work, (Word XP),though I didn't at home last night, (Word 2000). Must have been a typing error, (many times!)

I'll try again when I get home tonight.

I won't tick it yet, in case I need further help with updating it on opening!

Many thanks,



  g0slp 14:52 08 Apr 2005

I didn't realise that you could do such things in Word.

Great thread!


This thread is now locked and can not be replied to.

Elsewhere on IDG sites

iMac Pro review

Illustrator Charles Williams on how to create magazines and book covers

iMac Pro review

Les meilleures prises CPL (2018)