Stephen,
You didn't say that you were getting an error. The reason for the error is that I threw that code together in the ThisDocument module of the project which doesn't care about ActiveDocument (because it is the activedocuement). In a standard module modified as Graham advises will also work.
|