Article ID: 832287 - View products that this article applies to.
When you run a Microsoft Visual Basic for Applications (VBA) macro in Microsoft Word to open and then to save the changes to a Word document, you may receive the following error message:
For example, this problem may occur when you run a VBA macro that is similar to the following example:
Word cannot save this file because it is already open elsewhere.
This problem may occur if you have a mapped drive to the same location that your VBA macro is trying to save changes to the document.
To work around this problem, use one of the following methods.
Method 1: Use the ActiveDocument.FullName PropertyMicrosoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. To work around this problem, use the ActiveDocument.Fullname property as in the following macro example:
Method 2: Disconnect Your Mapped DriveTo work around this problem, disconnect your mapped drive before you run your VBA macro. To disconnect your mapped drive, follow these steps:
Article ID: 832287 - Last Review: September 18, 2011 - Revision: 4.0