OFF95: Location in File Properties Doesn't Display Full Path

ID: Q131183


The information in this article applies to:


SYMPTOMS

When you view the properties for a file in one of the Microsoft Office applications, the Location field on the General tab displays only the folder that contains the file and does not contain the complete path for the file.

For example, if you view the properties for a document in Microsoft Word that is located in C:\MSOFFICE\WINWORD\FILES, the Location field on the General tab in the Properties dialog box displays the text "files" instead of the entire path for the file.

This can be a problem if for example you have multiple folders called "files" that are in different locations on your computer, for example C:\MSOFFICE\WINWORD\FILES and C:\MSOFFICE\EXCEL\FILES.


WORKAROUND

To work around this problem, you can create a macro in Microsoft Excel and Word to display the full path for the active file. To do this, use the following procedure:

Microsoft Excel

Create the following procedure in a Visual Basic module. When you run this procedure, the full path for the active workbook is displayed in a dialog box:

   Sub ShowFileName()
      MsgBox ActiveWorkbook.Path
   End Sub 
Microsoft provides examples of Visual Basic procedures for illustration only, without warranty either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. This Visual Basic procedure is provided 'as is' and Microsoft does not guarantee that it can be used in all situations. Microsoft does not support modifications of this procedure to suit customer requirements for a particular purpose.

Microsoft Word

Create the following macro. When you run this macro, a dialog box appears with the full path for the active document, followed by a dialog box that displays the full path for the template that the file is based on:

   Sub Main
      Dim dlg As DocumentStatistics
      GetCurValues dlg
      MsgBox dlg.Directory
      MsgBox dlg.Template
   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.


STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


MORE INFORMATION

When you view the file properties for a file in the Explorer, or in My Computer, you can position the mouse pointer over the location field, and the entire path for the file is displayed on the screen. For example, if a file is located in C:\MSOFFICE\WINWORD\FILES, the Location field for this file still displays only "files," however, when you position the mouse pointer over the text "files," the entire path C:\MSOFFICE\WINWORD\FILES is displayed on the screen.

Note that in Microsoft Word, when you select the Summary tab for a document, the Template field contains only the template name, such as NORMAL.DOT, instead of the complete path for the template.


REFERENCES

For more information about viewing the properties for a document, click the Index tab in Microsoft Excel Help, type the following text

properties (document properties), v
and then double-click the selected text to go to the "Preview File Contents And Properties" topic.

Additional query words:


Keywords          : offwin xlwin 
Version           : 7.00
Platform          : WINDOWS 
Issue type        : 

Last Reviewed: June 8, 1999