Sub moosipurgisildid() kelle = InputBox("Kelle tehtud moos see on?") moos = InputBox("Mis moosiga on tegemist?") aasta = InputBox("Mis aasta moos see on?") mitusilti = Val(InputBox("Mitu silti on vaja?")) asukoht = 45 asukoht2 = 45 x = 0 y = 1 lk = mitusilti / 12 lkd = 1 Do While lkd < lk Selection.InsertBreak Type:=wdPageBreak lkd = lkd + 1 Loop Do While y < (lk + 1) x = 0 asukoht = 45 asukoht2 = 45 If mitusilti < 12 Then sildid = mitusilti Else mitusilti = mitusilti - 12 sildid = 12 End If Selection.GoTo What:=wdGoToPage, Name:=y Do While x < sildid x = x + 1 If x > 6 Then ActiveDocument.Shapes.AddTextbox(msoTextOrientationHorizontal, 297, _ asukoht2, 251, 124#).Select asukoht2 = asukoht2 + 124 Else ActiveDocument.Shapes.AddTextbox(msoTextOrientationHorizontal, 46, _ asukoht, 251, 124#).Select asukoht = asukoht + 124 End If Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter Selection.ShapeRange.TextFrame.TextRange.Select Selection.Collapse Selection.Font.Size = 16 Selection.TypeText Text:=kelle Selection.TypeParagraph Selection.Font.Bold = wdToggle Selection.TypeText Text:=moos Selection.Font.Bold = wdToggle Selection.TypeParagraph Selection.Font.Size = 12 Selection.TypeParagraph Selection.Font.Size = 28 Selection.InsertSymbol Font:="ZapfDingbats BT", CharacterNumber:=-3930, _ Unicode:=True Selection.TypeParagraph Selection.Font.Size = 12 Selection.TypeParagraph Selection.TypeText Text:=aasta Loop y = y + 1 Loop End Sub