We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Write Custom Properties in Word docs

Hi All,

I want to write the custom properties in the ms word document.

How could I do it from Aspose.

Or is there is any other way to to add the custom properties please help me out in that.

thanks

Kushagra

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. You can use the following simple code to add custom properties.

doc.CustomDocumentProperties.Add("myProperty", "my value");

Also please see the following link to learn more about custom document properties.

http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/aspose.words.properties.customdocumentproperties.html

Hope this helps.

Best regards.

Hi,

I want to add custom properties using java. I think this add method will not work for the java. Can you please suggest me the way to solve this problem.

Thanks

Kushagra

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. Here is the same code in java:

doc.getCustomDocumentProperties().add("myProperty", "my value");

See the following link for more information.

http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/com/aspose/words/customdocumentproperties.html#add(java.lang.String,%20java.lang.String)

Best regards.