Hi All:
I guess there is a bug in word 2010 where the form field will not save the number format selected. I found this macro to solve this issue:
Sub formatfldresult()
Dim ffname As String
ffname = Selection.Bookmarks(Selection.Bookmarks.Count).Nam e
With ActiveDocument.FormFields(ffname)
.Result = Format(.Result, "$#,###.00")
End With
End Sub
However, I need it to round the result as well. How does one change the one above to round to the nearest hundredth? Or if I change it to round to the nearest whole?
Thank you so much in advance!!!! Also does anyone recommend any good guides for writing macros for word ?
I guess there is a bug in word 2010 where the form field will not save the number format selected. I found this macro to solve this issue:
Sub formatfldresult()
Dim ffname As String
ffname = Selection.Bookmarks(Selection.Bookmarks.Count).Nam e
With ActiveDocument.FormFields(ffname)
.Result = Format(.Result, "$#,###.00")
End With
End Sub
However, I need it to round the result as well. How does one change the one above to round to the nearest hundredth? Or if I change it to round to the nearest whole?
Thank you so much in advance!!!! Also does anyone recommend any good guides for writing macros for word ?