Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
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: 22,467
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
 



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 09:49 AM.


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