Use the Run4DScript function that has been made available in the type library of Enterprise Dynamics. The return value is indeed a value. The first parameter is the 4DScript expression that needs to be executed. The second parameter is the string return value. So that is where your string will be returned.