while (document.CustomDocumentProperties.Count > 0)
document.CustomDocumentProperties.Remove(document.CustomDocumentProperties[0].Name);
document.Save("test.docx");
Why this does not work?
I see still CustomDocumentProperties in Word https://i.imgur.com/Vx2TehL.png even after running this. I breakpointed it and it looks like it is removing what is Word showing, but at end, nothing is removed. 16.2.0.46 is my version of Syncfusion. I am so confused.
What I am doing wrong? I want to remove them all, "Clean the file" from them.
//EDIT
When I run my app again, it shows document.CustomDocumentProperties.Count as 0. Is this a bug?
//EDIT 2
https://i.imgur.com/20DXfIm.png It is inside customXML folder in DOCX document... Why it was not removed? Why only MS Word on Windows sees it?