Custom Properties

Hi,


I am loading Custom Properties into a word document with following code

foreach (PropertyStructure propertyStructure in propertyStructures)
{
doc.CustomDocumentProperties.Add(propertyStructure.PropertyName,
propertyStructure.PropertyNameValue);
}

The custom properties get added; however, the order in which they are added gets sorted alphabetically once the value has been entered. I am looking to keep the order as is rather than resorting it.

Please let me know if this is possible. Regards,

Aaron

Hi Aaron,


Thanks for your inquiry. I managed to reproduce the same behaviour on my side. I have logged this issue in our bug tracking system. Our development team will further look into the details of this problem and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

Hi Aaron,


Thanks for your patience.

On further investigation our development team came to know that they won’t be able to implement the fix to your issue. Most likely, your issue will be closed with ‘‘Won’t Fix’’ resolution. Aspose.Words sorts these properties because some Microsoft document formats require writing sorted property set. Therefore, the issue will not actually be fixed but closed because we cannot fix this. However, could you please explain why this behavior is questioned so that we may provide you a workaround code for this.

Best regards,

My business partners had a specific order in which items needed to be found. I found a workaround to put a numeric prefix in front of it.

At this time, the work around works. So, I am good.

Thanks for looking into it. Aaron

Hi Aaron,

It's great you were able to find what you were looking for. Please let us know any time you have any further queries.

Best regards,