Paragraph borders lost when printing from a VBA macro

Article contributed by Jonathan West

There is a curious bug in Word. If you attempt to print a document using the PrintOut method in VBA, sometimes paragraph borders won't print. It took me ages to find out what the cause was of this.

The problem occurs if the ScreenUpdating property is set to False. Therefore, if you are in the habit of turning off screen updating to make your macro go faster, ensure that you turn it on again before you print:

Application.ScreenUpdating = True
ActiveDocument.PrintOut