View Single Post
 
Old 06-03-2014, 07:13 AM
JaapOnFire JaapOnFire is offline Windows 7 64bit Office 2007
Novice
 
Join Date: Jun 2014
Location: Boston
Posts: 5
JaapOnFire is on a distinguished road
Default Place Metric units in parenthesis behind English units

Hi there,

This is my first question and I think it should be easy enough if I can get some quick pointers in the right direction. Not too familiar with VBA in word (2007).

Here is the outline for what I wish to accomplish:

(1) Find each instance of "gpm" in my document. // gpm = gallons per minute
(2) Find the numerical value preceding this instance (engVal).
(3) Convert this value by multiplying it by a new value
metVal = engVal * 3.785 //convert to liters per minute
(4) Replace the "engVal gpm" string by "engVal gpm (metVal lpm)"
(5) Go to the next instance of "gpm" and ask whether to replace or not.

I rather manually confirm than do the whole document at once since there might be instances of "gpm" (table column headers) where I don’t want to replace it.

When I know how to do this for “gpm”, I can use it for other unit conversions as well.

Any help would be highly appreciated.

Kindest Regards,

Jaap
Reply With Quote