On Thu, 18 Sep 2003, Rafael Ortiz wrote:
Don Wiss wrote:
I'm using Excel 97. I know I can put =CELL("filename") in a cell, and then
have a macro assign that to the footer, but is there an & keyword that will
return the full path without this kludge? Knowing that &[File] returns the
file name, I tried words like Filename, Path, and Pathname, but to no
avail.
You can download and use this free add-in:
http://j-walk.com/ss/excel/files/addpath.htm
A little overkill. What I forgot to mention is we also want the name of the
sheet after the full filename. Since we generally print using macros I
ended up added these two lines around the printout line.
ActiveSheet.PageSetup.LeftFooter = ActiveWorkbook.FullName & "[" & ActiveSheet.Name & "]"
ActiveSheet.Printout
ActiveSheet.PageSetup.LeftFooter = "&F[&A]"
I set it back to the default, as it is possible for someone to save under a
new name, and then print without the macro. In such cases they would get the
wrong path.
Don <donwiss at panix.com.