Home | Tips | Library | Other Authors | Other WP Sites | Writer's Links | Contact | Site Map | Donate

Barry MacDonnell's
Toolbox for WordPerfect
 

Macros, tips, and templates for Corel® WordPerfect® for Windows®
© Copyright 1996-2024 by Barry MacDonnell. All Rights Reserved.

Page updated Feb 11, 2023

MakeReadOnly - Changes the currently open document to a Read Only file

Download MAKEREADONLY.ZIP (v1.0; 03/15/10; 5,805 bytes)

Written in WordPerfect X4 and should work with earlier versions

WordPerfect 11 users: See important information about using macros in the first release of WP11 (11.0.0.233) at the top of this page.

Downloading, Documentation, Modifications, and Support

Purpose

MakeReadOnly.wcm makes the currently open (on screen) document Read Only by changing the Windows file attribute for that document.

•  If the document is new (thus, not yet named) the macro will ask you to name it and save it so that it can be marked as Read Only. (Note that if it was already saved to disk as Read Only, no harm is done.)

•  If the document was opened from the disk, the macro will mark it as Read Only. A Yes/No message will ask for confirmation first.

If you then try to save it it will pop a message ("Access denied...") followed by the Save File dialog so you can save it with a different name. (Note that recent versions of WordPerfect will populate the File Name field in that dialog with characters taken from the top line of the document, as a suggestion. You can overwrite them and use any desired filename.)

You can easily remove the Read Only attribute in two ways.

•  If the file is not open, you can use Windows Explorer, or File Explorer, or  WordPerfect's File > Open window, and then -

[1] right-click on the filename,
[2] choose Properties, and 
[3] un-tick the Read Only box.
    - or -

•  If the file is open, save it with a different name with File > Save As. You then might want to (optionally) delete the read-only version.

Modifications

See the redlined User Modification Area in the macro code to enable or disable various pop up messages. [See the "...Modifications..." link in the left column of this page if you need help with this.]