ScreenUpdating Property Example

This example turns off screen updating and then adds a new document. Five hundred lines of text are added to the document. At every fiftieth line, the macro selects the line and refreshes the screen.

Application.ScreenUpdating = False
Documents.Add
For x = 1 To 500
    With ActiveDocument.Content
        .InsertAfter "This is line ." & x
        .InsertParagraphAfter
    End With
If x Mod 50 = 0 Then
   ActiveDocument.Paragraphs(x).Range.Select
   Application.ScreenRefresh
End If
Next x
Application.ScreenUpdating = True