diff --git a/zaaReloaded2/Formatter/Formatter.cs b/zaaReloaded2/Formatter/Formatter.cs
index c82210d..f19e380 100755
--- a/zaaReloaded2/Formatter/Formatter.cs
+++ b/zaaReloaded2/Formatter/Formatter.cs
@@ -88,6 +88,20 @@ namespace zaaReloaded2.Formatter
#region Public methods
+ ///
+ /// Writes some text to the current document.
+ /// Does nothing if there is no current document.
+ ///
+ /// Text to write to the current document.
+ ///
+ public void WriteToDocument(string text)
+ {
+ if (Document != null)
+ {
+ Document.Range().InsertAfter(text);
+ }
+ }
+
///
/// Formats the laboratory and writes it to a Word document.
///
diff --git a/zaaReloaded2/Formatter/ItemFormatter.cs b/zaaReloaded2/Formatter/ItemFormatter.cs
index 1bf7e20..39c3bb7 100755
--- a/zaaReloaded2/Formatter/ItemFormatter.cs
+++ b/zaaReloaded2/Formatter/ItemFormatter.cs
@@ -70,7 +70,7 @@ namespace zaaReloaded2.Formatter
/// Formats and writes the LabItem details to a word .
///
/// Word document to write to.
- public void WriteToDocument(Document document)
+ public void WriteToDocument(Formatter formatter)
{
string reference;
if (
@@ -134,7 +134,7 @@ namespace zaaReloaded2.Formatter
}
// Insert the formatted text into the document.
- document.Range().InsertAfter(
+ formatter.WriteToDocument(
String.Format(
"{0} {1}{2}{3}",
LabItem.QualifiedName,