DataStructure structure = doc.getDataStructure();
tf.setOutputStructure(structure);
tf.setTargetTextDocumentId(doc.getID());
} else {
// This will happen if the user deletes the text document before completing the wizard
throw new WizardPageException(delegate.getFirstPage(), "Must select a text document");
}
}