LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Further Challenges with Footers and automatic text wrapping

Everything is working with the exception of the final result. I have the
potential for some really long file paths and names. The problem is that the
three footer elements (leftfooter, centerfooter and rightfooter) are bottom
justified. All three are used as follows:

dd/mm/yyyy page
Company Name
Very long
file path and name.xls

If all three footer elements were top justified the problem would be solved.
I have tried adding carriage returns ( chr(13) ) in the left and center
footer which works. However I cannot tell how many lines my right footer is
going to be, 2 or 3. I have tried character counting but the combination of
flexible character width and automatic wrapping on a space and a dash only
make that idea very difficult to program. Any ideas? The code I have used
thusfar for setting the footer is as follows:

vFont = "&""Times New Roman,Regular""&8"
vFile = " &F"
vCR = Chr(13)
vCoName = "CompanyName"

' Assign date to left footer variable
vLeftFooter = vFont & "&D"
' Assign page number to center footer variable
vCenterFooter = vFont & "&P"
' Assign company name, carriage return and file path to right footer
variable
vRightFooter = vFont & vCoName & vCR & vPath & vFile

ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftFooter = vLeftFooter
.CenterFooter = vCenterFooter
.RightFooter = vRightFooter
End With

 
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
How do I prevent a long string of text from wrapping in a text fil stevekaz21 Excel Discussion (Misc queries) 1 October 23rd 09 03:46 PM
Programming Challenges! Loretta[_3_] Excel Programming 2 October 2nd 08 04:04 AM
Delete automatic headers/footers in dropdown lists in Excel 2003 MJ Excel Discussion (Misc queries) 0 November 8th 07 05:26 PM
Double-byte challenges. Please help! Douglas Gennetten[_2_] Excel Programming 0 January 15th 04 02:20 AM
Automatic word wrapping on the formula ... don't know its name Beto[_3_] Excel Programming 3 January 12th 04 03:01 PM


All times are GMT +1. The time now is 07:51 AM.

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

About Us

"It's about Microsoft Excel"