You can use the bounding box property of the text object to get the width of the text..
Here is an example...
dim objtxt as xpbaseobject
dim val as double
Self.GetObjectByName("field1", objtxt)
val = objtxt.boundingbox.width
val will return the width in pixels of the text object
#XPression