View Single Post
 
Old 05-20-2022, 05:45 AM
grNadpa grNadpa is offline Windows 10 Office 2016
Advanced Beginner
 
Join Date: Mar 2022
Posts: 46
grNadpa is on a distinguished road
Default

Thank you Guessed.
Whine alert: I do not understand the concept. Because of that, I do not know how to "apply a style to that range". Obviously the following does not do that.
Code:
Word.ActiveDocument.Sections(1).Headers(1).Range.Style = "Header"
    With ActiveDocument.Styles(wdStyleHeading1)
    .ParagraphFormat.Alignment = wdAlignParagraphCenter
    .Font.Name = "Times New Roman"
    .Font.Size = 14
    .Font.Bold = True
  End With
I do understand that Styles is a collection and Style is an object. And that the Style has properties. But the concept of "range" has me completely baffled.
Might you share the specific code that would achieve my Bold, 14 Point, Times New Roman heading?
Reply With Quote