tried that, but it the wrong document, i.e. the original document is selected. openAndSelectDocument(path,...) selects the new document which is correct.