Filename Not Added to Most Recently Used (MRU) List

Last reviewed: August 4, 1997
Article ID: Q115257
6.00 6.00a WINDOWS kbusage kbmacro

The information in this article applies to:

  • Microsoft Word for Windows, versions 6.0, 6.0a

SYMPTOMS

When you open a file from a custom FileOpen macro or use the FileOpen command from a macro, the name of the opened file is not added to the most recently used (MRU) list unless you save the file before closing it.

CAUSE

The FileOpen command in Word 6.0 includes a parameter (.AddToMru) that is set to 0 (zero) by default. When it is set to 1, FileOpen adds the filename to the MRU list when you close the file without saving it.

RESOLUTION

To add the file to the MRU list when it is opened but not saved before closing, add the .AddToMru = 1 statement to your macro. Place this statement after the GetCurValues dlg statement as in the following example:

Sub MAIN
Dim dlg As FileOpen GetCurValues dlg dlg.AddToMru = 1 Dialog dlg FileOpen dlg
End Sub

WARNING: 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.

Kbcategory: kbusage kbmacro KBSubcategory:


Additional reference words: 6.00 6.00a macros Files listed list word6
winword
Version : 6.00 6.00a
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: August 4, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.