Split file name to cover two rows in WORD footer.

S.H.A.D.O.

Well-known Member
Joined
Sep 6, 2005
Messages
1,915
Good afternoon,

I have file names which are quite long.

I want these file names to appear in the footer of each sheet followed by page 1 of x.
When entering the footer I can hit the enter key and it creates two lines for the file name and then when I hit enter again it drops the page 1 of x down another line. I end up with exactly what I want over three lines.

Now comes the BUT.

When i print the sheets it puts the filename into one line with the page 1 of x underneath, making two lines and not three.

Any help will be greatly appreciated.

Thanks in advance.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Good morning,

I currently have the footer setup in Insert > Footer > General so that the filename (and Page 1 of x) automatically gets pulled into the footer.

When I edit the footer and press enter it splits the filename into two lines which is what I want. This also shows as two lines within the document itself, even after it is saved and reloaded.

So for example, if I had the filename:

This is at the beginning of all filenames - [number of the section and will change] this is the section title and will change

...I want changed to:

This is at the beginning of all filenames
[number of the section and will change] this is the section title and will change

The problem is I think, is that the filename is pulled into the footer, and although I press enter and make the filename appear on two lines, when I print it, it still prints as one line.

If I edit, copy and paste the filename from explorer into the footer and then break the line where I want it broken it prints on three lines (two for the filename and one for the Page 1 of x).

The trouble is this needs to be done for MANY files so it will take ages to do it by this method manually.

Any help will be greatly appreciated.

Thanks in advance.
 
Upvote 0
If your filename is inserted via a FILENAME field, inserting a paragraph break or line break into it is futile - Word will remove any edits you make as soon as anything causes the field to update (e.g. printing the document). The only way to get the field to span multiple lines would be by formatting the paragraph concerned with left/right indents, as appropriate, to apply word-wrapping. That wrapping may or may not give quite the results you're after.
 
Upvote 0
Hi Paul,

If your filename is inserted via a FILENAME field, inserting a paragraph break or line break into it is futile.

I had pretty much come to that conclusion when Googling it, but thank you for the confirmation, it is appreciated.
I have managed to do them all manually now and it only took an hour so no biggie there.

Thanks again Paul and enjoy the rest of your weekend.
 
Upvote 0

Forum statistics

Threads
1,223,766
Messages
6,174,373
Members
452,560
Latest member
Turbos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top