I am setting custom document properties for a property that has a type of Yes/No.
Why does this command not work? It is setting it properly in code, but does not take in the Word document. Using C#
Document doc = new Document(templateFilePath);
doc.CustomDocumentProperties["~IsStrong"].Value = true;
I do have a doc.Range.UpdateFields(); command.
In this code, the document is created with custom document properties IsNew, IsNew2 and IsNew3.
When I examine the actual document, the custom document properties has: IsNew = No; IsNew2=Yes; IsNew3=Yes; The only difference, is that IsNew was an existing document property before the Clear command. The .Remove command does not help. Code
In the output document I get the expected result - IsNew = Yes; IsNew2=Yes; IsNew3=Yes.
Please make sure you are using the latest version of Aspose.Words. I use 5.2.2 version for testing.
Best regards.
I was using 5.1.1. Updated to 5.2.2. Same problem.
Then I discovered that there is a Word Macro that is setting “~IsNew” to false when the document is closed. Problem solved. Sorry to put you thru this problem. A bit embarrassed. Regards,