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

Free Support Forum - aspose.com

How To set ReadOnlyRecommended property


I am having a problem with documents built with Aspose.Words and then programmatically opened with MS Word. When MS Word opens the document, the user is first presented with a dialog box with this message

"... should be opened as read-only unless changes to it need to be saved. Open as read-only?"

I believe I can eliminate that dialog box if I set the ReadOnlyRecommended property to false, but I am having trouble coding a solution. Can you please provide an VB example?


Doug Kemp


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

Thanks for your inquiry. Could you please attach your documents and code here for testing? I will check the issue and provide you more information.

Best regards,

Hi ,

I've attached the VB snippet used to generate and programmatically open the document to print with a sample output document.


Hi Douglas,

Thanks for this additional information.

Please try using the code like this:

Dim doc As New Document("ce4df784-9b61-4583-9b9b-ce62ea55d688.doc")<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

doc.WriteProtection.ReadOnlyRecommended = False

doc.Save("ce4df784-9b61-4583-9b9b-ce62ea55d688 out.doc")


Hi -

Your code suggestion fixed my problem. Thanks for your prompt response.