View Single Post
  #11   Report Post  
Dave Peterson
 
Posts: n/a
Default

My expertise from API's comes from copying, pasting and following directions on
how to use them.

But Randy Birch has this:
http://vbnet.mvps.org/code/fileapi/pathcompactpath.htm



Bob Phillips wrote:

Hi Jim,

A glib response is that you could just widen the workbook window :-).

I also see that problem with files I open from emails, as they load into a
temporary directory. One way would be to check the name and the window
width, and if they don't fit, to truncate the name at the start, something
like 'C:\...\subdir\subdir2\filename', but it is still truncated, and seems
to defeat the purpose of the original request.

I can't think of a good soloution, other than to use the Excel caption bar.

--
HTH

Bob Phillips

"Jim May" wrote in message
news:uC2Ie.5198$MZ6.2147@lakeread01...
The sample I just tried **the full path is so long** the Windows title

bar
shows just so much and truncates with the "..." indicating there is

more...
what to do?
The Web Toolbar has an address box that seems to furnish the same info,
which can be accessed in full.(start to end)
Can you comment on this?
TIA,
Jim

"Bob Phillips" wrote in message
...
add this event procedure to ThisWorkbook

Private Sub App_WorkbookBeforeSave(ByVal Wb As Workbook, ByVal SaveAsUI

As
Boolean, Cancel As Boolean)
App_WindowActivate Wb, Windows(Wb.Name)
End Sub



--
HTH

Bob Phillips

"Mervyn Thomas" wrote in message
...
Thanks that works very well, but how would you refresh the caption
without
reopening the file - sometimes we do a <File Save as to a different
drive
and that is where the confusion usually starts?


"Bob Phillips" wrote in message
...
Public WithEvents App As Application

Private Sub Workbook_Open()
Set App = Application
End Sub

Private Sub App_WindowActivate(ByVal Wb As Workbook, ByVal Wn As
Window)
Wn.Caption = Wb.FullName
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--
HTH

Bob Phillips

"Mervyn Thomas" wrote in message
...
The default seems to be to show the filename on the top border in
Excel.
Is
there any way to include the full path including the drive letter as
well?
I have an operator who gets confused as to where she is and this

would
be
really nice.











--

Dave Peterson