WordBasic Error 52 Running BatchConversion MacroLast reviewed: July 31, 1997Article ID: Q155146 |
The information in this article applies to:
SUMMARYAfter you click Next in the first screen in the BatchConversion Wizard, you may receive a WordBasic Error #52, "Bad file name or number."
RESOLUTIONWARNING: ANY USE BY YOU OF THE OR MACRO 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. To resolve this problem, use the following steps:
MORE INFORMATIONThis problem may occur because the "windir" environment variable is a root directory, for example, "H:\." By modifing the line in the macro to resemble the following
ini$ = windir$ + "\winword6.ini"you sets the variable "ini$" to equal the path to the Windows directory and the Winword6.ini file. This workaround corrects the problem if Windows is not installed or mapped to a root directory (for example windir=c:\windows) when "\winword6.ini" is added to the windir variable (for example ini$=c:\windows\winword6.ini). However, if the windir variable is set to a root like "H:\" and the line reads "ini$=H:\\Winword6.ini," the double backslashes produce the error. The workaround described in this article works because the filename$ argument of the GetPrivateProfileString$ function defaults to the Windows directory (whatever it happens to be) if no path is given to the file. This problem has been resolved in Word for Windows 95 because all the entries that were previously read by the BatchConversion macro from the WINWORD6.INI file are now read from the registry.
|
KBCategory: kbprg kbmacro
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |