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!

Font Size of Filename in Footer

Status
Not open for further replies.

wiginprov

Technical User
May 5, 2001
35
US
Any tips on how to get the font size of the filename to be a smaller font? When I run the macro below, the font size is still 10 pt.

Dim ThisFile As String
ActiveWindow.ActivePane.View.Type = wdPageView
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
If Selection.HeaderFooter.IsHeader = True Then
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
Else
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
End If
ThisFile = ActiveDocument.Name
Selection.TypeText ThisFile
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
Selection.Font.Name = "Times New Roman"
Selection.Font.Size = 8
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
ActiveWindow.View.Type = wdPageView
End Sub
 
Try putting your font name/size BEFORE the TypeText This File line.

Or realize that if you already have the text in, you need to select it FIRST and THEN change the font...
techsupportgirl@home.com
Brainbench MVP for Microsoft Word
 
Thanks for the tips. The tip to MoveLeft worked. I added that bit using the macro recorder, which is why is read Move Right to select the text. Many thanks.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top