We help IT Professionals succeed at work.

Calculate age in Microsoft Word

2,132 Views
Last Modified: 2017-04-05
I am wanting to calculate age on a form document in word. I just need a easy to follow macro (I'm a newb to this).
Comment
Watch Question

ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
I am not sure which form field you have, you'll need to do the work yourself. To help you get started, check below link:
How Can I Put Calculated Dates in Word?

Take a look and let me know what additional questions you have.
Managing Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
K TinAnalyst

Author

Commented:
Sorry I'm dense... so do I click Ctrl-F9 and name, within the brackets, {CalcAge} or {MACROBUTTON CalcAge}
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
If you already have Data Field as above then you just run Macro CalcAge
K TinAnalyst

Author

Commented:
When I try to run the Macro I get an error "Run time error 5941 the requested member of the collection does not exist"
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
Please upload your sample document.
K TinAnalyst

Author

Commented:
Uploaded
test.docm
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
There is problem in your template. Let me make new one. Give me some time
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
Kindly note you need to double click on DOB Field and change the date in Default Date then run macro

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions