Since you have not given us the details of what "'compare documents'-> 'page by page visual compare'" actually returns I would suggest either looking a the Document Traversing functions of
, and giving us as much information as you can regarding what you are trying to achieve.