[Solved] Disable read-only warning
[Solved] Disable read-only warning
When I switch to read-only mode,I will get a warning prompt 'The document opens in read-only mode'.How to disable this feature?
Last edited by MrProgrammer on Wed Feb 28, 2024 6:38 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved] -- MrProgrammer, forum moderator
Reason: Tagged ✓ [Solved] -- MrProgrammer, forum moderator
Libre Office 7.6 on Windows 11.
Re: How to disable message prompt in read-only mode
What exactly are you doing? Are you changing the read-only status with a macro? If so, please show your code.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: How to disable message prompt in read-only mode
No,I want to load Doc in read-only mode.
Code: Select all
java.io.File sourceFile = new java.io.File(filePath);
StringBuffer sTemplateFileUrl = new StringBuffer("file:///");
sTemplateFileUrl.append(sourceFile.getCanonicalPath().replace('\\', '/'));
String loadUrl = sTemplateFileUrl.toString();
PropertyValue[] loadProps = new PropertyValue[3];
loadProps[0] = new PropertyValue();
loadProps[0].Name = "AsTemplate";
loadProps[0].Value = false;
loadProps[1] = new PropertyValue();
loadProps[1].Name = "Hidden";
loadProps[1].Value = false;
loadProps[2] = new PropertyValue();
loadProps[2].Name = "ReadOnly";
loadProps[2].Value = true;
//Get the office process to load the URL
aBean.loadFromURL( loadUrl, loadProps );
Libre Office 7.6 on Windows 11.
Re: How to disable message prompt in read-only mode
I don't want documents that I opened in read-only mode in this OPEN to go back to editable mode
Libre Office 7.6 on Windows 11.
Re: How to disable message prompt in read-only mode
This BASIC macro does not produce a warning when opening the document. I don't know what about your macro causes different behavior.
Code: Select all
DIM props(0) as NEW com.sun.star.beans.PropertyValue
props(0).Name = "ReadOnly"
props(0).Value = TRUE
oDoc = StarDesktop.loadComponentFromURL(convertToURL("C:\Users\fjcc\Desktop\forumAnswer.odt"), 0, "_blank", props())
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: How to disable message prompt in read-only mode
I forgot to mention that I used Libre Office, not Open Office.
Libre Office 7.6 on Windows 11.