![]() |
#6
|
||||
|
||||
![]()
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] |
|
![]() |
||||
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 |
![]() |
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 |