bSaveSuccess = OfficeDocument.store(xMSF, xTextDocument, sPath, "writer8_template", false, "Template could not be saved to " + sPath);
if (bSaveSuccess) {
saveConfiguration();
XInteractionHandler xIH = (XInteractionHandler) UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler"));
PropertyValue loadValues[] = new PropertyValue[4];
loadValues[0] = new PropertyValue();
loadValues[0].Name = "AsTemplate";
loadValues[1] = new PropertyValue();
loadValues[1].Name = "MacroExecutionMode";