I have a Word document with some functions. I want to access these functions in formula fields, but this was harder than anticipated.
Let's say I have a function defined as
Public Function Area(R As Double) As Double
Area = 3.14 * R * R
End Function
and that I want to use this in a field, like this
{ = Area(RadiusBookmark) }
This seems pretty straight forward, but I get a syntax error. If I omit the parameter, like this
{ = Area }
I get an "undefined bookmark" error, which leads me to believe that only bookmarks are available to the formula code fields.