Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-14-2011, 03:30 AM
Jamal NUMAN Jamal NUMAN is offline How to have the location (path) of the Word document on the title bar? Windows XP How to have the location (path) of the Word document on the title bar? Office 2007
Expert
How to have the location (path) of the Word document on the title bar?
 
Join Date: Nov 2010
Posts: 519
Jamal NUMAN is on a distinguished road
Question 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
Attached Images
File Type: jpg pathClip_71.jpg (136.6 KB, 32 views)
Reply With Quote
  #2  
Old 04-14-2011, 04:35 AM
macropod's Avatar
macropod macropod is offline How to have the location (path) of the Word document on the title bar? Windows 7 32bit How to have the location (path) of the Word document on the title bar? Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #3  
Old 04-14-2011, 05:04 AM
Jamal NUMAN Jamal NUMAN is offline How to have the location (path) of the Word document on the title bar? Windows XP How to have the location (path) of the Word document on the title bar? Office 2007
Expert
How to have the location (path) of the Word document on the title bar?
 
Join Date: Nov 2010
Posts: 519
Jamal NUMAN is on a distinguished road
Thumbs up

Thank you Paul. really you are expert! you have a solution for eacg single problem.

appreciated

regards

Jamal
Reply With Quote
  #4  
Old 04-14-2011, 09:22 AM
CGM3 CGM3 is offline How to have the location (path) of the Word document on the title bar? Windows XP How to have the location (path) of the Word document on the title bar? Office 2007
Advanced Beginner
 
Join Date: Oct 2009
Posts: 38
CGM3 is on a distinguished road
Default

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.
Reply With Quote
  #5  
Old 04-14-2011, 03:55 PM
macropod's Avatar
macropod macropod is offline How to have the location (path) of the Word document on the title bar? Windows 7 32bit How to have the location (path) of the Word document on the title bar? Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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 the vba editor and select your 'Personal' workbook. Then use File|Import to import the 'clsAppEvents.cls' file.

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
Exit & re-start Excel. You can also now delete the 'clsAppEvents.cls' file.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #6  
Old 04-17-2011, 03:00 PM
Jamal NUMAN Jamal NUMAN is offline How to have the location (path) of the Word document on the title bar? Windows XP How to have the location (path) of the Word document on the title bar? Office 2007
Expert
How to have the location (path) of the Word document on the title bar?
 
Join Date: Nov 2010
Posts: 519
Jamal NUMAN is on a distinguished road
Question

Hi Paul,

Do you have a Macro to show the Path in Microsoft Access?

thank you

regards

Jamal




Quote:
Originally Posted by macropod View Post
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 the vba editor and select your 'Personal' workbook. Then use File|Import to import the 'clsAppEvents.cls' file.

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
Exit & re-start Excel. You can also now delete the 'clsAppEvents.cls' file.
Reply With Quote
  #7  
Old 04-17-2011, 03:22 PM
macropod's Avatar
macropod macropod is offline How to have the location (path) of the Word document on the title bar? Windows 7 32bit How to have the location (path) of the Word document on the title bar? Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #8  
Old 04-17-2011, 03:49 PM
Jamal NUMAN Jamal NUMAN is offline How to have the location (path) of the Word document on the title bar? Windows XP How to have the location (path) of the Word document on the title bar? Office 2007
Expert
How to have the location (path) of the Word document on the title bar?
 
Join Date: Nov 2010
Posts: 519
Jamal NUMAN is on a distinguished road
Question

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:
Originally Posted by macropod View Post
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).
Reply With Quote
  #9  
Old 04-17-2011, 04:51 PM
macropod's Avatar
macropod macropod is offline How to have the location (path) of the Word document on the title bar? Windows 7 32bit How to have the location (path) of the Word document on the title bar? Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #10  
Old 04-28-2011, 06:38 PM
Jamal NUMAN Jamal NUMAN is offline How to have the location (path) of the Word document on the title bar? Windows XP How to have the location (path) of the Word document on the title bar? Office 2007
Expert
How to have the location (path) of the Word document on the title bar?
 
Join Date: Nov 2010
Posts: 519
Jamal NUMAN is on a distinguished road
Default

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
Attached Images
File Type: jpg Clip_142.jpg (64.2 KB, 25 views)
File Type: jpg 2.jpg (125.2 KB, 25 views)
Reply With Quote
  #11  
Old 04-28-2011, 10:17 PM
macropod's Avatar
macropod macropod is offline How to have the location (path) of the Word document on the title bar? Windows 7 32bit How to have the location (path) of the Word document on the title bar? Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #12  
Old 05-02-2011, 04:35 AM
Jamal NUMAN Jamal NUMAN is offline How to have the location (path) of the Word document on the title bar? Windows XP How to have the location (path) of the Word document on the title bar? Office 2007
Expert
How to have the location (path) of the Word document on the title bar?
 
Join Date: Nov 2010
Posts: 519
Jamal NUMAN is on a distinguished road
Thumbs up

Thank you Paul. It's great now

regards

Jamal
Reply With Quote
  #13  
Old 05-04-2011, 10:59 AM
Jamal NUMAN Jamal NUMAN is offline How to have the location (path) of the Word document on the title bar? Windows XP How to have the location (path) of the Word document on the title bar? Office 2007
Expert
How to have the location (path) of the Word document on the title bar?
 
Join Date: Nov 2010
Posts: 519
Jamal NUMAN is on a distinguished road
Question

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
Reply With Quote
  #14  
Old 05-04-2011, 02:29 PM
macropod's Avatar
macropod macropod is offline How to have the location (path) of the Word document on the title bar? Windows 7 32bit How to have the location (path) of the Word document on the title bar? Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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
I'm not sure about Excel.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #15  
Old 05-05-2011, 01:55 AM
Jamal NUMAN Jamal NUMAN is offline How to have the location (path) of the Word document on the title bar? Windows XP How to have the location (path) of the Word document on the title bar? Office 2007
Expert
How to have the location (path) of the Word document on the title bar?
 
Join Date: Nov 2010
Posts: 519
Jamal NUMAN is on a distinguished road
Thumbs up

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
Attached Images
File Type: jpg Clip_216.jpg (108.5 KB, 26 views)
Reply With Quote
Reply

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
How to have the location (path) of the Word document on the title bar? 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

Other Forums: Access Forums

All times are GMT -7. The time now is 12:21 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft