diff --git a/PROMS/Volian.Controls.Library/DSOTabPanel.cs b/PROMS/Volian.Controls.Library/DSOTabPanel.cs index 2ce36554..ee6cd732 100644 --- a/PROMS/Volian.Controls.Library/DSOTabPanel.cs +++ b/PROMS/Volian.Controls.Library/DSOTabPanel.cs @@ -152,6 +152,7 @@ namespace Volian.Controls.Library } public void FindSearchString() { + if (SearchString == null) return; // Get the Document LBDocumentClass wordDoc = new LBDocumentClass(_MyDSOFramer.ActiveDocument); //LBSelection sel = wordDoc.Application.Selection; @@ -253,8 +254,9 @@ namespace Volian.Controls.Library MessageBox.Show("Currently in VIEW mode,\r\n cannot Save " + _MyDisplayTabItem.Tooltip); return; } + LBDocumentClass doc = new LBDocumentClass(_MyDSOFramer.ActiveDocument); MyDSOFile.FullName = GetReflectiveProperty(_MyDSOFramer.ActiveDocument, "FullName"); - MyDSOFile.SaveFile(); + MyDSOFile.SaveFile(doc.Length); } /// /// Before a document closes check to see if it's contents should be saved. @@ -329,8 +331,9 @@ namespace Volian.Controls.Library try { _MyDSOFramer.Save(); + LBDocumentClass doc = new LBDocumentClass(_MyDSOFramer.ActiveDocument); MyDSOFile.FullName = GetReflectiveProperty(_MyDSOFramer.ActiveDocument, "FullName"); - MyDSOFile.SaveFile(); + MyDSOFile.SaveFile(doc.Length); } catch (Exception ex) {