#1   Report Post  
Joshua K Briley
 
Posts: n/a
Default Path in page footer

How can I include the full path of where the document resides on my
workstation, in the footer of my worksheets?
--
Somecallmejosh
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wsSht As Worksheet
For Each wsSht In ActiveWindow.SelectedSheets
wsSht.PageSetup.LeftFooter = "&""Arial,Bold""&8" & Me.FullName
Next wsSht
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

RP
(remove nothere from the email address if mailing direct)


"Joshua K Briley" wrote in message
...
How can I include the full path of where the document resides on my
workstation, in the footer of my worksheets?
--
Somecallmejosh



  #3   Report Post  
Joshua K Briley
 
Posts: n/a
Default

Thanks Bob,

I've found similar code from Microsoft, but I'm looking to do it from a
global perspective, if it is at all doable. Sorry for leaving out that
little detail. Can it be done?

There is a toolbar in word that allows for this, but I can't seem to locate
anything outside of code that will allow me to do it in Excel.
--
Somecallmejosh


"Bob Phillips" wrote:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wsSht As Worksheet
For Each wsSht In ActiveWindow.SelectedSheets
wsSht.PageSetup.LeftFooter = "&""Arial,Bold""&8" & Me.FullName
Next wsSht
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

RP
(remove nothere from the email address if mailing direct)


"Joshua K Briley" wrote in message
...
How can I include the full path of where the document resides on my
workstation, in the footer of my worksheets?
--
Somecallmejosh




  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

Josh,

You could try this. Add this code to Personal.xls, and it will then
automatically set the footer for any sheet in any workbook.

Private WithEvents app As Application

Private Sub app_WorkbookBeforePrint(ByVal Wb As Workbook, Cancel As Boolean)
With Wb.ActiveSheet
.PageSetup.LeftFooter = "&""Arial,Bold""&8" & Wb.FullName
End With
End Sub

Private Sub Workbook_Open()
Set app = Application
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

RP
(remove nothere from the email address if mailing direct)


"Joshua K Briley" wrote in message
...
Thanks Bob,

I've found similar code from Microsoft, but I'm looking to do it from a
global perspective, if it is at all doable. Sorry for leaving out that
little detail. Can it be done?

There is a toolbar in word that allows for this, but I can't seem to

locate
anything outside of code that will allow me to do it in Excel.
--
Somecallmejosh


"Bob Phillips" wrote:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wsSht As Worksheet
For Each wsSht In ActiveWindow.SelectedSheets
wsSht.PageSetup.LeftFooter = "&""Arial,Bold""&8" & Me.FullName
Next wsSht
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

RP
(remove nothere from the email address if mailing direct)


"Joshua K Briley" wrote in

message
...
How can I include the full path of where the document resides on my
workstation, in the footer of my worksheets?
--
Somecallmejosh






  #5   Report Post  
Joshua K Briley
 
Posts: n/a
Default

Thanks again Bob,

I've added the code to a workbook I've entitled as personal.xls. Is there a
specific location where this file should be saved for it to affect all other
workbooks? Or should it be saved as a template, from which to create new
workbooks?

I'm not sure that I did things correctly, because the code did not work on
the file itself. When I type in the following code, I get the desired
results... one page at a time:

Sub UpdateFooter()
ActiveSheet.PageSetup.LeftFooter = ActiveWorkbook.FullName
End Sub
--
Somecallmejosh


"Bob Phillips" wrote:

Josh,

You could try this. Add this code to Personal.xls, and it will then
automatically set the footer for any sheet in any workbook.

Private WithEvents app As Application

Private Sub app_WorkbookBeforePrint(ByVal Wb As Workbook, Cancel As Boolean)
With Wb.ActiveSheet
.PageSetup.LeftFooter = "&""Arial,Bold""&8" & Wb.FullName
End With
End Sub

Private Sub Workbook_Open()
Set app = Application
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

RP
(remove nothere from the email address if mailing direct)


"Joshua K Briley" wrote in message
...
Thanks Bob,

I've found similar code from Microsoft, but I'm looking to do it from a
global perspective, if it is at all doable. Sorry for leaving out that
little detail. Can it be done?

There is a toolbar in word that allows for this, but I can't seem to

locate
anything outside of code that will allow me to do it in Excel.
--
Somecallmejosh


"Bob Phillips" wrote:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wsSht As Worksheet
For Each wsSht In ActiveWindow.SelectedSheets
wsSht.PageSetup.LeftFooter = "&""Arial,Bold""&8" & Me.FullName
Next wsSht
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

RP
(remove nothere from the email address if mailing direct)


"Joshua K Briley" wrote in

message
...
How can I include the full path of where the document resides on my
workstation, in the footer of my worksheets?
--
Somecallmejosh








  #6   Report Post  
Bob Phillips
 
Posts: n/a
Default

Joshua,

The hint is at the foot of the message. You need to store it in ThisWorbook,
see the directions. It also needs to be initialised, so close down Excel,
and start anew. The Workbook_Open should kick it off.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Joshua K Briley" wrote in message
...
Thanks again Bob,

I've added the code to a workbook I've entitled as personal.xls. Is there

a
specific location where this file should be saved for it to affect all

other
workbooks? Or should it be saved as a template, from which to create new
workbooks?

I'm not sure that I did things correctly, because the code did not work on
the file itself. When I type in the following code, I get the desired
results... one page at a time:

Sub UpdateFooter()
ActiveSheet.PageSetup.LeftFooter = ActiveWorkbook.FullName
End Sub
--
Somecallmejosh


"Bob Phillips" wrote:

Josh,

You could try this. Add this code to Personal.xls, and it will then
automatically set the footer for any sheet in any workbook.

Private WithEvents app As Application

Private Sub app_WorkbookBeforePrint(ByVal Wb As Workbook, Cancel As

Boolean)
With Wb.ActiveSheet
.PageSetup.LeftFooter = "&""Arial,Bold""&8" & Wb.FullName
End With
End Sub

Private Sub Workbook_Open()
Set app = Application
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

RP
(remove nothere from the email address if mailing direct)


"Joshua K Briley" wrote in

message
...
Thanks Bob,

I've found similar code from Microsoft, but I'm looking to do it from

a
global perspective, if it is at all doable. Sorry for leaving out

that
little detail. Can it be done?

There is a toolbar in word that allows for this, but I can't seem to

locate
anything outside of code that will allow me to do it in Excel.
--
Somecallmejosh


"Bob Phillips" wrote:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wsSht As Worksheet
For Each wsSht In ActiveWindow.SelectedSheets
wsSht.PageSetup.LeftFooter = "&""Arial,Bold""&8" &

Me.FullName
Next wsSht
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

RP
(remove nothere from the email address if mailing direct)


"Joshua K Briley" wrote in

message
...
How can I include the full path of where the document resides on

my
workstation, in the footer of my worksheets?
--
Somecallmejosh








  #7   Report Post  
Dave Peterson
 
Posts: n/a
Default

John Walkenbach has an addin you may like.
http://j-walk.com/ss/excel/files/addpath.htm

It builds the macro code for you if you run the macro. (You may not always want
to do this???).

You can save John's addin anywhere, then turn it on via Tools|Addins (and point
to the location where you saved the addin).

Alternatively, if you're running xl2002+ (which supports the full path in
headers/footers), you could use a couple of template files.

Create a new workbook named book.xlt and set up the page layout the way you
want.

Save this book.xlt in your XLStart folder.

You can create another single sheet workbook that has the same page layout, but
save it as sheet.xlt.

Any new workbook will inherit the settings from book.xlt. Any new worksheet
added to an existing workbook will inherit the settings from sheet.xlt.

But this won't help any existing worksheets in existing workbooks.



Joshua K Briley wrote:

How can I include the full path of where the document resides on my
workstation, in the footer of my worksheets?
--
Somecallmejosh


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
print file path and location in a footer be New Users to Excel 2 June 15th 05 03:56 PM
header and footer on every page except the first page? marany Excel Discussion (Misc queries) 1 April 18th 05 06:12 PM
How do I hide the header and footer on page 1 in Excel? Performance Technology Excel Discussion (Misc queries) 1 April 14th 05 09:36 PM
adding a new page break to an existing page break Edward Letendre Excel Discussion (Misc queries) 1 March 6th 05 09:29 AM
Entering Path Name in Footer Emily Edgington Excel Worksheet Functions 2 November 9th 04 06:48 PM


All times are GMT +1. The time now is 07:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"