カスタム書式設定をフィールドに適用する
Contents
[
Hide
]
場合によっては、ユーザーがフィールドにカスタム書式を適用する必要があることがあります。この記事では、これを行う方法の例をいくつか見ていきます。
オプションの詳細については、フィールドモジュール の対応するクラスの各フィールド タイプのプロパティの完全なリストを参照してください。
IF
状態の評価方法
mail merge の後に IF
条件を評価する場合は、式の評価結果をすぐに返す EvaluateCondition メソッドを使用できます。
次のコード例は、このメソッドの使用方法を示しています。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-Python-via-.NET | |
builder = aw.DocumentBuilder() | |
field = builder.insert_field("IF 1 = 1", None).as_field_if() | |
actualResult = field.evaluate_condition() | |
print(actualResult) |