Password protection and bookmark issues with Word 2007

Dear Aspose support:
I am evaluting Aspose Word java. Recently we upgraded to Word 2007 from 2003. After after there are two (so far) features stopping working. One is password protection. If I set a password in Aspose, the generated Word file is read only but I can not input the password to remove the protection. Another problem is that any bookmark I insert using Aspose are not available in Word any more.
Both features worked fine in Word 2003. I tried to save generated Word file in ‘doc’ and ‘docx’ but it didn’t help. Please let me know what you think.
Thanks,
Ligong

This message was posted using Page2Forum from Feature Overview - Aspose.Words for .NET and Java

Hi

Thanks for your request. Could you please provide me simple code, which will allow me to reproduce both of these issues on my side? I will check them and provide you more information.
Best regards.

Hi Alexey,
This is how I add protection:

new_doc.protect(ProtectionType.ALLOW_ONLY_FORM_FIELDS, my_password);

This is how I add bookmarks:

builder.startBookmark(my_bookmark_name);
builder.endBookmark(my_bookmark_name);

I open a blank “dot” file with some Macro code to start like this:

com.aspose.words.Document new_doc = new com.aspose.words.Document("C:\\server_side\\generated_files\\Decision.dot");

then I add protection and bookmark into this document.
Please let me know what else you need.
Thanks,
Ligong

Hi

Thank you for additional information. I cannot reproduce the problems on my side. I used the latest version of Aspose.Words for Java for testing. You can download the latest version from here:
https://releases.aspose.com/words/java
Best regards.

It is working now.
Thanks a lot.
Ligong