Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple fonts within one footer

Status
Not open for further replies.

red22j

Programmer
Aug 1, 2002
10
0
0
US
Hi,

I'm trying to make a right footer and I need to have multiple fonts in it. Something like:

(CompanyName) "Inc."

where (CompanyName) is italicized and Inc. is not.

I wanted something like ws.pagesetup.rightfooter = &quot;<I>Company</I> Inc.&quot;....

Any help would be appreciated,
Jon
 
Use your good friend record macro. It will show something like

.RightFooter = &quot;Pg. &P of &N ... printed &16&D&10 &T ... tab '&A' in '&F'&&quot;&quot;Arial,Italic&quot;&quot;(unsa&&quot;&quot;Arial,Regular&quot;&quot;ved file)&quot;

Can you run with it from here?
 
Yes, this was very helpful, thank you.

Just to clarify to those who don't know this trick:
I went to excel and did Tools -> Macro -> Record New Macro...
Then I went to the footer and made the changes I needed. When I finished recording the macro it saved the macro in VBA code. Basically it produced and bunch of useless stuff and one useful line that looked something like:

myWs.PageSetup.RightFooter = &quot;&&quot;&quot;Arial,Bold Italic&quot;&quot;Company Name &&quot;&quot;Arial,Bold&quot;&quot;Incorporated&quot; & Chr(10) & &quot;&quot;

where Company Name is italicized nd Incorporated isn't.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top