OFF95: Location in File Properties Doesn't Display Full PathID: Q131183
|
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.
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:
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.
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.
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.
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.
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), vand 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