Hi, I'm trying to write a VBA macro to type "=lorem(1,5) <plus Enter>" into Word so that I don't have to type in the lorem string to generate the usual lorem text. If I type it in and press Enter, it gets replaced by the desired text. If I record a macro of my actions and run the macro, nothing happens until I type a space. Then the whole paragraph shows up. Same with the '=rand(2,5)' string.

How can I change my macro to make it update the display (or run the macro after the string has been inserted into the buffer)? Thank you

Selection.TypeText Text:="=rand(2,2)"
Selection.TypeText Text:=vbCr