WD: FileClose in Macro Doesn't Work with Protected FormLast reviewed: February 5, 1998Article ID: Q126366 |
The information in this article applies to:
SYMPTOMSIf a WordBasic macro contains FileClose and the macro is used on exit from a form field of a protected document, the FileClose command will not function, and the following error message will appear:
WordBasic Err=102, Command Failed WORKAROUNDWARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. Use the following macro instead of the FileClose command in a macro to close a protected form:
Sub MAIN a = Now() OnTime a, "FileClose" End SubWhen using the above workaround, you will be unable to use the SAVE parameter for the FileClose command. If you need to use this parameter, use the SetDocumentDirty command instead. The following macro uses the SetDocumentDirty command to close the document without saving.
Sub MAIN a = Now() SetDocumentDirty 0 OnTime a, "FileClose" End Sub STATUSMicrosoft has confirmed this to be a problem in Word versions 6.0, 6.0a, 6.0c, and 7.x. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
|
Additional query words: forms
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |