Aspose.Words.Document(Stream) does not load my form fields

Hi Patrick,
Thanks for your inquiry. But unfortunately, it is not quite clear for me what you mean. You can do not use mergefields in IF fields at all. I put a mergefield just to demonstrate how IF fields work.
Please follow the link to learn more about IF fields:
https://support.microsoft.com/en-us/office/field-codes-if-field-9f79e82f-e53b-4ff5-9d2c-ae3b22b7eb5e
Best regards,

Hi Alexey,
thanks for the link. I actually read a couple of documents about IF, but from my understanding, you need to provide the TrueText and FalseText inside your IF statement, which makes sense.
However, Im wondering how can someone decide that a text which already exist inside his word document will be displayed or not. Let say I have a paragraph of text in my Word document. This paragraph may contain text, images, tables or anything I want. Then I want to display or show this entire block of text (paragraph) or hide it, depending of something I evaluate. Here is an example for normal situations:

{IF "«test»" = "true" "This content will be displayed if contion is true" "Display is false"}

What if, instead of “This content will be displayed if contion is true”, I want to have a block of text containing paragraphs, tables, or anything else ?
Then, I can’t put all that text into by IF field, but it will already exist in my document.

Does this help to better understand my scenario ?
Thanks again !

Patrick Goudjo Ako

Hi Patrick,
Thanks for your inquiry.
If you look carefully you will see that the template provided by Alexey already demonstrates how to insert block level content such as paragraphs into an IF field. With the document open, please toggle field codes by pressing ALT+F9 and you will see that the true text contains two separate paragraphs.
To insert all types of content into the IF field just type normally into the field as if you were normally typing a document.
If you have any further queries, please feel free to ask.
Thanks,