WD: LockDocument 0 Doesn't Unlock Subdocument w/ Author Mismatch

ID: Q116473

The information in this article applies to:

SUMMARY

The "Microsoft Word Developer's Kit" incorrectly states that if you run the WordBasic command LockDocument with the Lock argument set to 0 and the insertion point in the master document, you can remove the locks from all subdocuments of a master document. This is true only if you have protected the document using the LockDocument macro or the Lock Document button on the Master Document toolbar. If any subdocument has been locked by another means, this command fails to unlock the subdocument.

MORE INFORMATION

A subdocument can be set to read-only (locked) by the author. A subdocument may also be marked read-only by the system if the author name for the master document and subdocument do not match. In these cases, the "LockDocument 0" command has no impact on the subdocument's read-only status.

REFERENCES

"Microsoft Word Developer's Kit," version 6.0, page 559

"Microsoft Word Developer's Kit, Third Edition", page 624

"Microsoft Word User's Guide," version 6.0, pages 541, 544

Online Help topic "Locking or unlocking a master document or a subdocument"

Additional query words: subdoc docerr protected

Keywords          : kbmacro kbdtacode wordnt winword ntword macword word6 word7 word95 
Version           : WINDOWS:6.0,6.0a,6.0c,7.0,7.0a; MACINTOSH:6.0,6.0.1,6.0.1a
Platform          : MACINTOSH Win95 WINDOWS winnt

Last Reviewed: March 27, 1998