Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    May 2007
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Converting feet to meters (Word 2003)

    In a Word form, I am entering data as a number in units of feet in a text form field. I would like to automatically convert this to meters and populate the next field with it. Has anyone done this? The form looks like this: x.xx ft ( x.xx m) Thanks.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Converting feet to meters (Word 2003)

    Turn off protection.
    Double click the first form field (the one for feet).
    - Tick the check box 'Calculate on Exit'.
    - Set the bookmark name of the form field to (for example) Feet.
    - Click OK.
    Double click the second form field (for meters).
    - Set the Type to Calculation.
    - Enter the following formula in the Expression box:
    <code>
    =Feet*0.3048
    </code>
    - Click OK.
    Now protect the document for forms.
    When the user tabs (or clicks) out of the first form field, the second form field will automatically be recalculated.

  3. #3
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Converting feet to meters (Word 2003)

    Note that the formula that Hans provided assumes that the users enter the measurement in feet as a decimal rather than the feet and inches that they most likely think in. Code to convert feet and inches would require two separate fields (one for feet, one for inches) and the formula would have to take into account both variables.

    If your entry fields are named Feet and Inches then the calculation field would look like =0.3048(Feet+(Inches/12))
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Converting feet to meters (Word 2003)

    FWIW Hans' code will work if you input the feet and inches in the form of '#+#/12' (eg 1+1/12) or as a decimal value (eg 1.083333), but not as '#ft #in'.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  5. #5
    Lounger
    Join Date
    May 2007
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Converting feet to meters (Word 2003)

    Thanks. Not only did I get it to work, I also was able to adapt your code to convert miles to kilometers. Thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •