WD: LockDocument Command Does Not Unlock Subdocuments |
Q117510
When you run the WordBasic "LockDocument 0" statement, with the insertion
point in the master document, Word does not remove the read-only protection
from (that is, unlock) the subdocuments, as expected.
The WordBasic LockDocument statement should work as described on page 559
of the "Microsoft Word Developer's Kit" or in the Help file for WordBasic.
These sources state that the LockDocument statement adds or removes read-
only protection for a document's subdocuments if the insertion point is
within the master document when the macro is run.
To unlock the subdocuments using a macro containing the "LockDocument 0" command, you must manually place the insertion point in each subdocument before running the macro. You can create a routine to unlock all the subdocuments by including the "LockDocument 0" command in a While. . .Wend loop.
Microsoft has confirmed this to be a problem in the Word versions listed above. This problem was corrected in Word 97 for Windows and Word 98 Macintosh Edition.
"Microsoft Word Developer's Kit," version 6.0, page 559
"Microsoft Word Developer's Kit," Third Edition, page 624
Additional query words:
Keywords : kbmacro wordnt winword ntword macword word6 word7 word95
Issue type : kbbug
Technology :
|
Last Reviewed: November 4, 2000 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |