Limit long text to right footer section

  • Thread starter Thread starter LauriS
  • Start date Start date
L

LauriS

Is there any way to limit a very long path name to the right footer section?

If I put it in as normal it stretches out across the bottom of the page
almost to the left side. I want it to stay in the right section - taking up
several lines if necessary.
Thanks!

Lauri S.
 
Maybe you could add a few enter keys to force a new line in the right hand
footer.

(right before or after the path separator (\)???)
 
Dave,

I'm using code to get the file and path name since it may change:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.RightFooter = "&07" & ActiveWorkbook.FullName &
vbLf & vbLf
ActiveSheet.PageSetup.CenterFooter = "Page " & [Page] & " of " & [pages]
End Sub

Lauri S.
 
Dim myFooter as string
myfooter = activeworkbook.fullname
myfooter = replace(myfooter, "\", vblf & "\")
activesheet.pagesetup.rightfooter = "&07" & myfooter


Untested, uncompiled.

And if you have lots of short folder names, this may not be what you want.

Dave,

I'm using code to get the file and path name since it may change:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.RightFooter = "&07" & ActiveWorkbook.FullName &
vbLf & vbLf
ActiveSheet.PageSetup.CenterFooter = "Page " & [Page] & " of " & [pages]
End Sub

Lauri S.

Dave Peterson said:
Maybe you could add a few enter keys to force a new line in the right hand
footer.

(right before or after the path separator (\)???)
 
Dave,

Thanks!! That will work.

And we can use it just for the long path names (right now they are typing
the whole thing manually).

Lauri S.

Dave Peterson said:
Dim myFooter as string
myfooter = activeworkbook.fullname
myfooter = replace(myfooter, "\", vblf & "\")
activesheet.pagesetup.rightfooter = "&07" & myfooter


Untested, uncompiled.

And if you have lots of short folder names, this may not be what you want.

Dave,

I'm using code to get the file and path name since it may change:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.RightFooter = "&07" & ActiveWorkbook.FullName &
vbLf & vbLf
ActiveSheet.PageSetup.CenterFooter = "Page " & [Page] & " of " & [pages]
End Sub

Lauri S.

Dave Peterson said:
Maybe you could add a few enter keys to force a new line in the right hand
footer.

(right before or after the path separator (\)???)

LauriS wrote:

Is there any way to limit a very long path name to the right footer section?

If I put it in as normal it stretches out across the bottom of the page
almost to the left side. I want it to stay in the right section - taking up
several lines if necessary.
Thanks!

Lauri S.
 
Back
Top