KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Using WP FREEZE FORMULAS to turn expressions into plain text
PRODUCT: 4D Write Pro | VERSION: 20 | PLATFORM: Mac & Win
Published On: April 23, 2024

When using expressions to add table references to your document in 4D Write Pro, you may find that using WP GET ATTRIBUTES returns some style values as -2147483647, even if through the Write Pro toolbox the style values are normal. This negative integer is equal to wk mixed, which means that the style on the range you are getting the attributes of is mixed.

In such cases, you could change how you are obtaining the range before calling WP GET ATTRIBUTES, or use WP FREEZE FORMULAS to replace the formulas and expressions in your target object with their computed value in plaintext. This is especially useful when your document needs to be emailed or printed, since the expressions may not be displayed or evaluated correctly. The code below will freeze all the expressions in your Word Pro document:

WP FREEZE FORMULAS(WParea)


Adding the additional parameters wk do not recompute expressions and wk recompute expressions will also perform their respective actions before the target object is frozen. By default, expressions are recomputed if this parameter is omitted.