MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Format file path font in footer


Posted by Cathy Roberts on November 29, 2000 1:56 PM

How do I apply formatting codes to a full file name in a footer? I'm using
.PageSetup.LeftHeader = ThisWorkbook.FullName

to insert the file name. I know how to apply formatting to text strings but not how to print the full filename in bold, for example.


Posted by Ben O. on November 29, 2000 2:34 PM

I think there's a section on formatting headers and footers in the Microsoft Knowledge Base. If not there, the Excel help file. It's a little confusing.

Here's what you can use to make it bold:

ActiveSheet.PageSetup.LeftHeader = "&""Arial,Bold""&10" & ThisWorkbook.FullName

Change Arial to the font you want, and 10 to the size you want.

-Ben

Posted by Cathy Roberts on November 30, 2000 6:52 AM

Thank you--that worked perfectly! (I wasn't placing quotation marks correctly when I had tried it.)