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

Free Support Forum - aspose.com

Problem with Aspose.Words for java

Hi
I am new by Aspose product
My problem is that i wanna to set my word properties and change them when i ran my program with new properties
Imagine i have to properties in my word environment
(I set them in File > Info > Properties > Advanced properties > Custom tab
And then i can see them in Insert tab > Quick Parts >Fields )
Now, i want to change these properties dynamically with getMailMerge(dataTable)
Namely after running program i want see my doc by new properties
Is it possible ?
Indeed i havent any database object . my dynamic objects are the same properties
Please help me to resolve this
My code sample attached to this topic
Thank you so much for your kindly help

Hi Soudeh,


Thanks for your inquiry. I think, you can achieve what you need after reading the article suggested below:
http://docs.aspose.com/display/wordsjava/Working+with+Document+Properties

Please let us know if you need more information, we are always glad to help you.

Best Regards,

Hi

Thank you so much for your kindly helps
I saw this link at first
I could do it in Application console (by System.out.println)
Indeed i wanna to change properties in IDE and see the updated properties in doc,docx,pdf or any other formatted
Assume that i have a document called “document.doc” in my project, i wanna to change the properties of this document (by DocumentProperties and getCustomDocumentProperties or any needed method ) and then see them in “document out.doc”
Indeed My problem is access to document properties and change and display them
Do you know any solution for this?
Thanks in advanced for your reply

Hi

I could do it myself
My code attached by this topic
Now i have another problem
I have nonEnglish property values (Arabic and Persian )
Their format changed after dispalying in created document
For example : i have a property value namely “myValue تست دوم”
After running the program and see created document i see this as below format :
"myValue دوم تست "
This is my problem and i could not resolve it so far
Could you help me to resolve this?
Thank you so much for your helps again

Sorry

Forgot to attach the code

Hi Soudeh,


Thanks for your inquiry. Perhaps you’re using an older version of Aspose.Words; as with Aspose.Words for Java v11.0.0, I was unable to reproduce this issue on my side. I would suggest you please upgrade to the latest version of Aspose.Words i.e. v11.0.0.

I hope, this will help.

Best Regards,

Hi

Thank you for your reply
I could resolve this issue as well
i added this line to my code after creating the DocumentBuilder :

DocumentBuilder docGen= new DocumentBuilder(d);
docGen.getParagraphFormat().setBidi(true);

Thank you again for your kindly helps :slight_smile:
Hi,

Thanks for the additional information. It is perfect that you managed to resolve the problem on your side. If we can help you with anything else, please feel free to ask.

Best Regards,

Hi

Thank you so much for your support
Sincerely