View Single Post
 
Old 04-26-2013, 05:29 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Elan05 View Post
My document does have other macros in it. Does that mean I can't use the calculation feature in the fields?
Not at all. It's just that, once you've established a requirement to use macros for one part of the exercise, you may as well use them wherever else they're suitable, rather than presenting whoever has to maintain the document later on with a mix of macros and field calculations.
Quote:
I created the following calculation (made sure it worked in Excel before transferring over to Word).

=IF(Cycle="Annually", "Year1"/1, IF(Cycle ="Semiannually", "Year1"/2, IF(Cycle ="Quarterly", "Year1"/4, IF(Cycle ="Monthly", "Year1"/12, IF(Cycle ="Bimonthly", "Year1"/6, IF(Cycle ="Triannually", "Year1"/3,0))))))
When I protected the document and tabbed through the fields, it skipped over the field with the formula and didn't calculate anything.
The field formula syntax in Word is not the same as in Excel. To see how to do a wide range of calculations in Word, check out my Microsoft Word Field Maths Tutorial, at:
http://windowssecrets.com/forums/sho...l=1#post320143
or
http://www.gmayor.com/downloads.htm#Third_party
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote