#1
|
|||
|
|||
How to have the location (path) of the Word document on the title bar?
How to have the location (path) of the Word document on the title bar?
Please, see the attached image that shows my question Simply, we need to know where we are! It is not enough to have only the name of the file in the title bar…we need to have the path (location) as well… Is there a way to have the path in the title bar? Thank you Regards Jamal |
#2
|
||||
|
||||
Hi Jamal,
Add the following code to your 'Normal' template: Code:
Sub AutoOpen() 'Displays the Document Path in the Title Bar ActiveWindow.Caption = ActiveDocument.FullName End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thank you Paul. really you are expert! you have a solution for eacg single problem.
appreciated regards Jamal |
#4
|
|||
|
|||
A handy little modification. Can we do the same thing for Excel?
While I haven't been able to locate a "template worksheet", I have found that putting the code: ' ' Displays the Workbook Path in the Title Bar ' ActiveWindow.Caption = ActiveWorkbook.FullName In the Workbook_Open macro does show the path for that workbook. |
#5
|
||||
|
||||
For Excel, it's a bit more complicated. First, you need to have a 'Personal' Workbook. If you don't have one, you can create it by recording a macro and telling Excel to store in the 'Personal Macros Workbook'. You can delete the macro (and its code module) later.
Using Notepad, save the following code to a text file named 'clsAppEvents.cls'. Code:
VERSION 1.0 CLASS BEGIN MultiUse = -1 'True END Attribute VB_Name = "clsAppEvents" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = False Attribute VB_Exposed = False Option Explicit Public WithEvents App As Application Attribute App.VB_VarHelpID = -1 Private Sub App_WindowActivate(ByVal Wb As Workbook, ByVal Wn As Window) Application.ActiveWindow.Caption = ActiveWorkbook.FullName End Sub Open your 'Personal' workbook's 'ThisWorkbook' module and the following code to it: Code:
Option Explicit Dim AppClass As New clsAppEvents Private Sub Workbook_Open() Set AppClass.App = Application End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
Hi Paul,
Do you have a Macro to show the Path in Microsoft Access? thank you regards Jamal Quote:
|
#7
|
||||
|
||||
Hi Jamal,
No, but there appears to be some code for doing this on the web. See, for example: http://www.accessmonster.com/Uwe/For...ich-DB-is-open (see especially the post by Allen Browne on 23 Aug 2008).
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#8
|
|||
|
|||
thank you Paul.
this sounds to need some development...my skills in programing are extremely limited... i was looking for macro to use straight away. regards Jamal Quote:
|
#9
|
||||
|
||||
Hi Jamal,
You might find something ready for use if you ask in the 'Misc' forum here or in a specialist Access forum (recommended).
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#10
|
|||
|
|||
Partially Solved!!! Showing the file name and path in the title bar of Access!
Just copy and past the Macro and the Module from the file (in the link below) to your Access file. Then the Macro will show the name of the file and the path on the title bar. http://www.mediafire.com/?267a9atzm6m535u The problem in this method that we need to copy the Macro and Module to each file to show its name and path. If we compare this feature with other software like AutoCAD, we get shocked! this feature is an option that we can get it by simple tick!!!!! regards Jamal |
#11
|
||||
|
||||
Microsoft Office is not AutoCAD. Some software developers see some things as important that other software developers don't.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#12
|
|||
|
|||
Thank you Paul. It's great now
regards Jamal |
#13
|
|||
|
|||
Hi Paul,
Please, How to develop the code to show also the size of the file (in KB) on the title bar? and the date of creation? In Word and Excel. thank you regards Jamal |
#14
|
||||
|
||||
Hi Jamal,
For Word: Code:
Sub AutoOpen() 'Displays the Document Path & File Size in the Title Bar With ActiveDocument ActiveWindow.Caption = .FullName & ": " & _ .BuiltInDocumentProperties(wdPropertyBytes) / 1024 & "KB" End With End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#15
|
|||
|
|||
Thank You Paul. It did work.
is there a way to remove (truncate) the decimal places from the number? (attached) And please, how to add comma Separator for the Number (example: 1549 = 1,549) regards Jamal |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Create Hyperlinks from Word to specific location in PDF | sukanyae | Word | 0 | 02-25-2010 04:08 PM |
Show Full File Path in Title Bar | paulj | Excel | 3 | 02-10-2010 07:18 AM |
Convert word document to JPEG. The word document may contain headerfooters | vijayaram | Word | 1 | 12-30-2009 08:25 AM |
Programmatically get File Path for currently opened WORD document | franferns | Word | 1 | 11-26-2009 12:36 PM |
attaching (relative,logical or virtual) path to template word document | wissam | Mail Merge | 0 | 08-04-2009 05:09 AM |