![]() |
#1
|
|||
|
|||
![]()
Is there an option to show the full path at the top of the Word 2013 window instead of just the filename? If so where can I find it?
|
#2
|
||||
|
||||
![]()
You can do it with a macro (or macros), and it helps to move the QAT (Quick Access Toolbar) below the ribbon, to provide more space.
The following is what I use in my systems. You may not need all the options, but you can delete those you don't. Insert a new module in the normal template, call it (say) modAutoMacros and add the following macro code. http://www.gmayor.com/installing_macro.htm Because of the availability of very long filenames, the path length may have to be curtailed to fit the available space. I have it set at 120 characters. You may need to change that. Code:
Option Explicit Sub AutoOpen() On Error Resume Next With ActiveWindow.View If Err.Number = 4248 Then Exit Sub .Type = wdPrintView .Zoom = 100 .TableGridlines = True End With ActiveWindow.ActivePane.View.ShowAll = False ActiveWindow.ActivePane.View.ShowFieldCodes = False If ActiveDocument.Bookmarks.Exists("OpenAt") = True Then ActiveDocument.Bookmarks("OpenAt").Select End If InsertDocTitle lbl_Exit: Exit Sub End Sub Sub AutoNew() With ActiveWindow.View .Type = wdPrintView .TableGridlines = True .Zoom = 100 .ShowFieldCodes = False .ShowAll = False End With ActiveWindow.ActivePane.View.ShowAll = False lbl_Exit: Exit Sub End Sub Sub InsertDocTitle() ' Changes window title to include path with filename Dim NameArray As Variant Dim NameStringL As String Dim NameStringR As String Dim Count As Long Const maxLen = 120 ' set this value to fit your window width ' (avoid error if no active window) If Windows.Count > 0 Then NameStringL = ActiveDocument.FullName If Len(NameStringL) > maxLen Then ' separate the folder names NameArray = Split(NameStringL, "\") ' check the folder depth Count = UBound(NameArray) If Count > 3 Then NameStringL = NameArray(0) & "\...\" NameStringR = NameArray(Count) Count = Count - 1 ' continue adding folders to the left of the string ' until you run out of folders or one won't fit Do While (Count > 0) And _ (Len(NameStringL) + Len(NameStringR) + _ Len(NameArray(Count)) < maxLen) NameStringR = NameArray(Count) & "\" _ & NameStringR Count = Count - 1 Loop NameStringL = NameStringL & NameStringR End If End If ' Change the window's caption ActiveWindow.Caption = NameStringL End If lbl_Exit: Exit Sub End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
XmisterIS | Word VBA | 4 | 08-28-2024 03:32 PM |
![]() |
HighSierra | Word | 6 | 05-06-2015 07:04 PM |
![]() |
GeneH | Word | 3 | 05-07-2014 01:44 PM |
![]() |
Carlos06x | Word | 1 | 10-12-2011 10:39 AM |
Show Full File Path in Title Bar | paulj | Excel | 3 | 02-10-2010 07:18 AM |