The VBA variables that you are creating (Dim) are named the same as objects in the object model (like Universe, Document, DataProvider, etc.). Change those to Univ, Doc, DProv, etc. and see if that changes anything. Also for reference, you may want to look at the code in this utility. It’s a utility that documents all of the objects used in a series of .rep files, so it is doing similar logic.
Dwayne Hoffpauir (BOB member since 2002-09-19)