diff --git a/zaaReloaded2/Formatter/Formatter.cs b/zaaReloaded2/Formatter/Formatter.cs index ebedc68..2d3e55d 100755 --- a/zaaReloaded2/Formatter/Formatter.cs +++ b/zaaReloaded2/Formatter/Formatter.cs @@ -121,7 +121,6 @@ namespace zaaReloaded2.Formatter { if (!CanRun) throw new NoLaboratoryDataException("No laboratory data to format."); - CreateStyles(); int current = 0; while (current < Settings.Elements.Count) { @@ -146,7 +145,14 @@ namespace zaaReloaded2.Formatter current++; } } + + // Write everything to the Word document + Globals.ThisAddIn.Application.UndoRecord.StartCustomRecord( + String.Format("Laborformatierung ({0})", Properties.Settings.Default.AddinName) + ); + CreateStyles(); _secondaryBuffer.Flush(); + Globals.ThisAddIn.Application.UndoRecord.EndCustomRecord(); } ///