diff --git a/src/frontend/app/administration/template/template-administration.component.html b/src/frontend/app/administration/template/template-administration.component.html
index a3a747e0309e47b5afdfeb856eb7dc19abd98757..1a52310f8061d8032a0da159c9473f105dee45d1 100755
--- a/src/frontend/app/administration/template/template-administration.component.html
+++ b/src/frontend/app/administration/template/template-administration.component.html
@@ -158,7 +158,7 @@
                         </div>
 
                         <div class="form-group" *ngIf="template.template_type=='OFFICE_HTML'">
-                            <mat-tab-group (selectedTabChange)="initMce('textarea#templateOfficeHtml')">
+                            <mat-tab-group (selectedTabChange)="loadTab($event);">
                                 <mat-tab label="{{lang.electronicTemplate}}">
                                     <div class="form-group" *ngIf="template.template_type=='OFFICE_HTML'">
                                         <div class="col-sm-12">
diff --git a/src/frontend/app/administration/template/template-administration.component.ts b/src/frontend/app/administration/template/template-administration.component.ts
index 34333a97db8e6b05e251c81b482b6972150c4de6..1b96936c5f7eef6ad4b6d2a64677a3c5aad2be4f 100755
--- a/src/frontend/app/administration/template/template-administration.component.ts
+++ b/src/frontend/app/administration/template/template-administration.component.ts
@@ -379,6 +379,16 @@ export class TemplateAdministrationComponent implements OnInit {
         this.fileToImport();
         this.template.uploadedFile = null;
     }
+
+    loadTab (event:any) {
+        if (event.index === 0) {
+            this.initMce('textarea#templateOfficeHtml');
+        } else {
+            if (this.template.template_file_name == null && this.template.template_style == null) {
+                this.buttonFileName = this.lang.importFile;
+            }
+        }
+    }
 }
 @Component({
     templateUrl: "template-administration-checkEntities-modal.component.html",