Option Explicit
Sub w170216_1451_zag()
Dim pr As Paragraph
For Each pr In Word.ActiveDocument.Paragraphs
If pr.Range.Bold = True Or pr.OutlineLevel < 10 Then
pr.Range.Select
w170216_font 0
End If
Next pr
Debug.Print "fin=" & Now
End Sub
Sub w170216_font(n1z)
Dim j1
Dim zName, zSize, zBold, zItalic, zUnderline, zUnderlineColor, zStrikeThrough, zDoubleStrikeThrough
Dim zOutline, zEmboss, zShadow, zHidden, zSmallCaps, zAllCaps, zColor, zEngrave, zSuperscript, zSubscript
Dim zSpacing, zScaling, zPosition, zKerning, zAnimation, zLigatures
Dim zNumberSpacing, zNumberForm, zStylisticSet, zContextualAlternates
Dim zLeftIndent, zRightIndent, zSpaceBefore, zSpaceBeforeAuto, zSpaceAfter, zSpaceAfterAuto
Dim zLineSpacingRule, zAlignment, zWidowControl, zKeepWithNext, zKeepTogether, zPageBreakBefore
Dim zNoLineNumber, zHyphenation, zFirstLineIndent, zOutlineLevel, zCharacterUnitLeftIndent
Dim zCharacterUnitRightIndent, zCharacterUnitFirstLineIndent, zLineUnitBefore, zLineUnitAfter
Dim zMirrorIndents, zTextboxTightWrap
j1 = n1z
m1:
j1 = j1 + 1
If j1 > 2 Then Exit Sub
''
With Selection.Font
If j1 = 1 Then zName = .Name Else .Name = zName
If j1 = 1 Then zSize = .Size Else .Size = zSize
If Len(Selection.Range.Text) < 4 And .Bold = True Then
.Bold = False
End If
If .Bold = False And j1 = 1 And Len(Selection.Range.Text) > 4 Then
Debug.Print Selection.Range.Text
j1 = j1 + 0
End If
If j1 = 1 Then zBold = .Bold Else .Bold = zBold
If j1 = 1 Then zItalic = .Italic Else .Italic = zItalic
If j1 = 1 Then zUnderline = .Underline Else .Underline = zUnderline
If j1 = 1 Then zUnderlineColor = .UnderlineColor Else .UnderlineColor = zUnderlineColor
If j1 = 1 Then zStrikeThrough = .StrikeThrough Else .StrikeThrough = zStrikeThrough
If j1 = 1 Then zDoubleStrikeThrough = .DoubleStrikeThrough Else .DoubleStrikeThrough = zDoubleStrikeThrough
If j1 = 1 Then zOutline = .Outline Else .Outline = zOutline
If j1 = 1 Then zEmboss = .Emboss Else .Emboss = zEmboss
If j1 = 1 Then zShadow = .Shadow Else .Shadow = zShadow
If j1 = 1 Then zHidden = .Hidden Else .Hidden = zHidden
If j1 = 1 Then zSmallCaps = .SmallCaps Else .SmallCaps = zSmallCaps
If j1 = 1 Then zAllCaps = .AllCaps Else .AllCaps = zAllCaps
If j1 = 1 Then zColor = .Color Else .Color = vbRed
'''zColor
If j1 = 1 Then zEngrave = .Engrave Else .Engrave = zEngrave
If j1 = 1 Then zSuperscript = .Superscript Else .Superscript = zSuperscript
If j1 = 1 Then zSubscript = .Subscript Else .Subscript = zSubscript
If j1 = 1 Then zSpacing = .Spacing Else .Spacing = zSpacing
If j1 = 1 Then zScaling = .Scaling Else .Scaling = zScaling
If j1 = 1 Then zPosition = .Position Else .Position = zPosition
If j1 = 1 Then zKerning = .Kerning Else .Kerning = zKerning
If j1 = 1 Then zAnimation = .Animation Else .Animation = zAnimation
If j1 = 1 Then zLigatures = .Ligatures Else .Ligatures = zLigatures
If j1 = 1 Then zNumberSpacing = .NumberSpacing Else .NumberSpacing = zNumberSpacing
If j1 = 1 Then zNumberForm = .NumberForm Else .NumberForm = zNumberForm
If j1 = 1 Then zStylisticSet = .StylisticSet Else .StylisticSet = zStylisticSet
If j1 = 1 Then zContextualAlternates = .ContextualAlternates Else .ContextualAlternates = zContextualAlternates
End With
With Selection.ParagraphFormat
If j1 = 1 Then zLeftIndent = .LeftIndent Else .LeftIndent = zLeftIndent
If j1 = 1 Then zRightIndent = .RightIndent Else .RightIndent = zRightIndent
If j1 = 1 Then zSpaceBefore = .SpaceBefore Else .SpaceBefore = zSpaceBefore
If j1 = 1 Then zSpaceBeforeAuto = .SpaceBeforeAuto Else .SpaceBeforeAuto = zSpaceBeforeAuto
If j1 = 1 Then zSpaceAfter = .SpaceAfter Else .SpaceAfter = zSpaceAfter
If j1 = 1 Then zSpaceAfterAuto = .SpaceAfterAuto Else .SpaceAfterAuto = zSpaceAfterAuto
If j1 = 1 Then zLineSpacingRule = .LineSpacingRule Else .LineSpacingRule = zLineSpacingRule
If j1 = 1 Then zAlignment = .Alignment Else .Alignment = zAlignment
If j1 = 1 Then zWidowControl = .WidowControl Else .WidowControl = zWidowControl
If j1 = 1 Then zKeepWithNext = .KeepWithNext Else .KeepWithNext = zKeepWithNext
> Лукьянов Михаил:
If j1 = 1 Then zKeepTogether = .KeepTogether Else .KeepTogether = zKeepTogether
If j1 = 1 Then zPageBreakBefore = .PageBreakBefore Else .PageBreakBefore = zPageBreakBefore
If j1 = 1 Then zNoLineNumber = .NoLineNumber Else .NoLineNumber = zNoLineNumber
If j1 = 1 Then zHyphenation = .Hyphenation Else .Hyphenation = zHyphenation
If j1 = 1 Then zFirstLineIndent = .FirstLineIndent Else .FirstLineIndent = zFirstLineIndent
''If j1 = 1 Then zOutlineLevel = .OutlineLevel Else .OutlineLevel = zOutlineLevel
If j1 = 1 Then zCharacterUnitLeftIndent = .CharacterUnitLeftIndent Else .CharacterUnitLeftIndent = zCharacterUnitLeftIndent
If j1 = 1 Then zCharacterUnitRightIndent = .CharacterUnitRightIndent Else .CharacterUnitRightIndent = zCharacterUnitRightIndent
If j1 = 1 Then zCharacterUnitFirstLineIndent = .CharacterUnitFirstLineIndent Else .CharacterUnitFirstLineIndent = zCharacterUnitFirstLineIndent
If j1 = 1 Then zLineUnitBefore = .LineUnitBefore Else .LineUnitBefore = zLineUnitBefore
If j1 = 1 Then zLineUnitAfter = .LineUnitAfter Else .LineUnitAfter = zLineUnitAfter
If j1 = 1 Then zMirrorIndents = .MirrorIndents Else .MirrorIndents = zMirrorIndents
If j1 = 1 Then zTextboxTightWrap = .TextboxTightWrap Else .TextboxTightWrap = zTextboxTightWrap
If j1 = 1 Then
Selection.Range.Style = ActiveDocument.Styles("обычный")
End If
End With
GoTo m1
End Sub