"Г.Г.Кудрявцев. Как на самом деле делаются книги для lib.ru " - читать интересную книгу автора



3) –…Ќ’ђ€ђЋ‚ЂЌ€…

Sub AltE()

1 Dim N As String
3 Dim pos As Integer
2 Dim x, y, i, f, c, j, Mypos As Integer
4 Dim F1, F2 As String

x = Selection.Start
y = Selection.End
N = ActiveDocument.Range(x, y).Text
F2 = Chr$(13)
f = 1
c = 0

Rem Џ®¤бзҐв ў®§ўа в®ў Є аҐвЄЁ ў ўл¤Ґ«Ґ­­®¬ да Ј¬Ґ­вҐ

20 Mypos = InStr(f, N, F2, 1)
22 If Mypos <> 0 Then f = Mypos + 1: c = c + 1: GoTo 20

Rem ‚ла ў­Ёў ­ЁҐ Ї® 業ваг

Selection.HomeKey Unit:=wdLine
Selection.TypeText Text:=" "
Selection.HomeKey Unit:=wdLine
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
Selection.Delete Unit:=wdCharacter, Count:=1
pos = Selection.EndKey(Unit:=wdLine, Extend:=wdMove)
Selection.HomeKey Unit:=wdLine

80 x = Int((76 - pos) / 2)
Rem MsgBox (x)

Rem ўла ў­Ёў ­ЁҐ Ї® 業ваг ЇҐаў®© бва®ЄЁ ўл¤Ґ«Ґ­Ёп
90 For i = 1 To x
100 Selection.TypeText Text:=" "
110 Next i
Rem ўла ў­Ёў ­ЁҐ Ї® 業ваг ЇҐаў®© бва®ЄЁ ўл¤Ґ«Ґ­Ёп

Rem ўла ў­Ёў ­ЁҐ Ї® ЇҐаў®© бва®ЄҐ ўл¤Ґ«Ґ­Ёп ўбҐе ®бв «м­ле
For j = 1 To c - 1

Selection.HomeKey Unit:=wdLine
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.TypeText Text:=" "
Selection.HomeKey Unit:=wdLine
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend