Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Insert file name in header without showing extension

707 views
Skip to first unread message

Cynergy

unread,
Feb 23, 2010, 11:49:01 AM2/23/10
to
I know how to get the filename into a header/footer. Is there any way to get
the filename in the header/footer WITHOUT showing the filename extension?

מיכאל (מיקי) אבידן

unread,
Feb 23, 2010, 3:14:06 PM2/23/10
to
1) Click on 'My Computer' > 'Tools' > 'Folder Options...' > View tab and
check the option "Hide extensions for known files".
OR:
2) If you don't want to change the way your computer displays file names -
make use of a Macro:
-------------------------------------------------------
Sub Header_FileName_No_Extension()
On Error Resume Next
LFN = InStrRev(ActiveWorkbook.Name, ".")
FN = Left(ActiveWorkbook.Name, LFN - 1)
ActiveSheet.PageSetup.CenterHeader = FN
End Sub
----------------------
Micky
0 new messages