Thanks cowski, however, I couldn't get your code to work. It throws an error when compiling:
"Line 51: Value of type '1-dimensional array of integer' cannot be converted to 'Integer'"
Line is:
theUfSession.Drf.AskTextData(1, ann_data, textLine, physLength, numChars)
and it seems the problem...