Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub KhkVormistus()
- '
- ' KHK vormistus Makro
- '
- '
- Selection.WholeStory ' Märgistab kogu teksti
- Selection.Font.Name = "Times New Roman" ' Muudab fonti
- Selection.Font.Size = 12 ' Fondi suurus
- Selection.ParagraphFormat.Alignment = wdAlignParagraphJustify
- With Selection.ParagraphFormat
- .LeftIndent = CentimetersToPoints(0)
- .RightIndent = CentimetersToPoints(0)
- .SpaceBefore = 0
- .SpaceBeforeAuto = False
- .SpaceAfter = 6 ' Vahed peale teksti 6 punkti
- .SpaceAfterAuto = False
- .LineSpacingRule = wdLineSpace1pt5 ' Reavahe 1.5
- .Alignment = wdAlignParagraphJustify
- .WidowControl = True
- .KeepWithNext = False
- .KeepTogether = False
- .PageBreakBefore = False
- .NoLineNumber = False
- .Hyphenation = True
- .FirstLineIndent = CentimetersToPoints(0)
- .OutlineLevel = wdOutlineLevelBodyText
- .CharacterUnitLeftIndent = 0
- .CharacterUnitRightIndent = 0
- .CharacterUnitFirstLineIndent = 0
- .LineUnitBefore = 0
- .LineUnitAfter = 0
- .MirrorIndents = False
- .TextboxTightWrap = wdTightNone
- End With
- With ActiveDocument.Styles(wdStyleNormal).Font
- If .NameFarEast = .NameAscii Then
- .NameAscii = ""
- End If
- .NameFarEast = ""
- End With
- With ActiveDocument.PageSetup
- .LineNumbering.Active = False
- .Orientation = wdOrientPortrait
- .TopMargin = CentimetersToPoints(3)
- .BottomMargin = CentimetersToPoints(3)
- .LeftMargin = CentimetersToPoints(4)
- .RightMargin = CentimetersToPoints(2)
- .Gutter = CentimetersToPoints(0)
- .HeaderDistance = CentimetersToPoints(1.25)
- .FooterDistance = CentimetersToPoints(1.25)
- .PageWidth = CentimetersToPoints(21)
- .PageHeight = CentimetersToPoints(29.7)
- .FirstPageTray = wdPrinterDefaultBin
- .OtherPagesTray = wdPrinterDefaultBin
- .SectionStart = wdSectionNewPage
- .OddAndEvenPagesHeaderFooter = False
- .DifferentFirstPageHeaderFooter = False
- .VerticalAlignment = wdAlignVerticalTop
- .SuppressEndnotes = False
- .MirrorMargins = False
- .TwoPagesOnOne = False
- .BookFoldPrinting = False
- .BookFoldRevPrinting = False
- .BookFoldPrintingSheets = 1
- .GutterPos = wdGutterPosLeft
- End With
- Selection.Find.ClearFormatting
- Selection.Find.Replacement.ClearFormatting
- With Selection.Find ' Otsimine ja asendus
- .Text = "^l"
- .Replacement.Text = "^p"
- .Forward = True
- .Wrap = wdFindAsk
- .Format = False
- .MatchCase = False
- .MatchWholeWord = False
- .MatchWildcards = False
- .MatchSoundsLike = False
- .MatchAllWordForms = False
- End With
- Selection.Find.Execute Replace:=wdReplaceAll
- Selection.Font.Bold = False ' Võtab boldi välja
- End Sub
Add Comment
Please, Sign In to add comment