Custom Office Scripting

I am trying to write a script that will take numeric values that are currently stored in a string field and perform a mathematically expression on them.

For example:

Field 1 is 10 character String field 

Field 2 is 10 character String field 

I am wanting to take Field 1 times Field 2 and place the result in a new numeric UDF field.

At present, both Field 1 and Field 2 only contain numeric text, but it would be great if we could verify that the script too.

So how do I create a script that will take string fields and convert to numbers?

Thank you