File name or class name not found during Automation operation (Visual Basic) File not found (Visual Basic Run-Time Error) File specified by FileName does not use the encoding specified by FileEncoding. File specified in FileName is not a valid XML file. File's open mode wasn't set to a valid value. For loop not initialized (Visual Basic). Microsoft support engineers can help explain the functionality of a particular procedure. However, they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
Applicability
The information on this page applies to: | |
---|---|
MathType for Windows | Microsoft Word for Windows |
Issue
- When performing a copy and paste operation, users sometimes see this Visual Basic error:
- The error shown above sometimes appears when launching Word.
Solution
It is likely the file MathPage.WLL is not located in Office's STARTUP folder. To add it manually, please follow these steps:
- Visit whichever of these folders is appropriate for your bit-level of Office:
C:Program Files (x86)MathTypeMathPage32
C:Program Files (x86)MathTypeMathPage64
- Once copied, visit the following location:
C:Users[user name]AppDataRoamingMicrosoftWordSTARTUP
Note this folder is normally hidden, so if you don’t have Windows set up to show hidden folders, you won’t be able to see it. If you still can't find this folder, you may paste the file here:C:Program Files or Program Files(x86)Microsoft OfficerootOffice16STARTUP
orC:Users[user name]AppDataLocalPackages
Microsoft.Office.Desktop_8wekyb3d8bbweLocalCacheRoamingMicrosoftWordSTARTUP - After pasting the file, be sure to completely close Word, then re-open.
If that resolved the issue, you are done. If not, we suggest re-starting your computer and testing again.
If the issue has not been resolved, you may also change the macro security center settings to Disable all macros except digitally signed macros, or enable all macros. We've described below how to do this. MathType's macro for Word is digitally signed.
Please note: When enabling all macros, please be cautious with documents from senders that you are not familiar with. Documents from unknown sources can contain malicious code.
- Click the ‘File’ menu or the ‘Office’ button in the upper left corner.
- Click ‘Trust Center Settings’.
- Select the radio button for ‘Disable all macros except digitally signed macros.’
- Close Word and then re-open Word.
*If that does not resolve the issue, you may try enabling all macros.
Microsoft Visual Basic Runtime Error 53 On A Windows 10
We hope this has been helpful. As always, please let us know if you have questions about this, or if you have additional techniques that work. We'd love to hear from you.
-->Visual Basic Runtime Error 53
An error occurred trying to access the specified file. This error has the following causes and solutions:
A statement refers to a file with a file number or file name that is:
Not specified in the Open statement or was specified in an Open statement, but has since been closed. Specify the file name in an Open statement. Note that if you invoked the Close statement withoutarguments, you may have inadvertently closed all currently open files, invalidating all file numbers.
Out of the range of file numbers (1 - 511). If your code is generating file numbers algorithmically, make sure the numbers are valid.
There is an invalid name or number.
File names must conform to operating system conventions as well as Basic file-naming conventions.
In Microsoft Windows, use the following conventions for naming files and directories:
The name of a file or directory can have two parts: a name and an optional extension. The two parts are separated by a period, for example, myfile.new.
The name can contain up to 255 characters.
The name must start with either a letter or number. It can contain any uppercase or lowercase characters (file names aren't case-sensitive) except the following characters: quotation mark ('), apostrophe ('), slash (/), backslash (**), colon (:), and vertical bar (|**).
The name can contain spaces.
The following names are reserved and can't be used for files or directories: CON, AUX, COM1, COM2, COM3, COM4, LPT1, LPT2, LPT3, PRN, and NUL. For example, if you try to name a file PRN in an Open statement, the default printer will simply become the destination for Print # and Write # statements directed to the file number specified in the Open statement.
On the Macintosh, a file name can include any character except the colon (:), and can contain spaces. Null characters (Chr(0)) aren't allowed in any file names.
Microsoft Visual Basic Runtime Error 53 On A Chromebook
For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.