B2017-219 if a word section cannot be opened because it is gotten from a bad database record, then create a blank word document and open it

This commit is contained in:
2017-09-22 16:41:45 +00:00
parent 61a31cec22
commit 73593b8546
3 changed files with 50 additions and 26 deletions

View File

@@ -1044,6 +1044,16 @@ namespace Volian.Controls.Library
//if ((myItemInfo.MyContent.MyEntry.MyDocument.LibTitle ?? "") != "")
// MessageBox.Show("WARNING: All edits made to this Library Document will be applied to all uses of the Document");
pg = new DisplayTabItem(this.components, this, myItemInfo, key); // Open a new document page
// B2917-219 if MyEdWord is null that means we had trouble opening the word attachment and either a blank document was created or a previous version was recovered
// so we now we want to open the now blank or recovered attachment
if (pg.MyDSOTabPanel.MyEdWord == null)
{
pg = OpenDSOTabPage(myItemInfo);
if (pg.MyDSOTabPanel.MyEdWord == null)
return null; // even the blank or recovered attachment cannot be opened
else
return pg;
}
_MyDisplayTabItems.Add(key, pg);
}
SelectDisplayTabItem(pg);