View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Nathan Carroll Nathan Carroll is offline
external usenet poster
 
Posts: 5
Default Footer word wrap

I have the following that works through a vb.net add-in

Private Sub btnAutoFooter_Click(ByVal Ctrl As Office.CommandBarButton, ByRef
CancelDefault As Boolean) Handles btnAutoFooter.Click
Dim wb As Excel.Workbook = Me.ExApp.ActiveWorkbook
Dim ws As Excel.Worksheet
For Each ws In wb.Worksheets
With ws.PageSetup
.RightFooter = "&8&""Arial,Regular""" & "&D Page &P of &N"
.LeftFooter = "&8&""Arial,Regular""" & wb.FullName & vbCrLf &
"Sheet:" & "&A"
.CenterFooter = ""
End With
Next
End Sub


I am trying to get the the line for the left footer to wrap. The vbcrlf and
vbnewline cause 2 returns not one. Is there some way to get only one?
Otherwise my sometime long filenames run all the way over into the right
footer.