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-2020 by Barry MacDonnell. All Rights Reserved.

Page updated Feb 20, 2020

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

Makes the currently open (on screen) document Read Only by changing the Windows file attribute.

•  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 disc, 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 remove the Read Only attribute in Windows Explorer, File Explorer, or the WordPerfect File Open window by right-clicking on the filename, choosing Properties, and then un-ticking the Read Only box.

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 if you need help with this.