![]() ![]() With this macro the file can be edited after it opens. To work around this problem, use the following Word Basic macro instead of the Visual Basic macro shown in step 8 of the "Cause" section of this article: Sub Test() The document opens as a read-only document. In the Macro name list, click Test, and then click Run. ![]() On the Tools menu, point to Macro, and then click Macros. In the Module sheet, type the following code: Sub Test()ĭocuments.Open FileName:="C:\Test.doc", ReadOnly:=False Press ALT+F11 to start the Visual Basic editor. In the Options dialog box, on the Security tab, click to select the Read-only recommended check box. Start Word, and then create a new document. Note The following example applies to Word 20: This problem occurs because Visual Basic opens any document with the ReadOnlyRecommended attribute set to true as a read-only document, even if you attempt to set the ReadOnly attribute to false. You can open the document for editing by clicking Yes on the message. PathName should be opened as read-only unless changes to it need to be saved.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |