B2017-138 Add error handling for setting Bottom Margin
Removed debug output
This commit is contained in:
parent
fa68b282b8
commit
537ab3c21c
@ -1057,7 +1057,7 @@ namespace VEPROMS
|
||||
if (dti.MyDSOTabPanel != null)
|
||||
dti.MyDSOTabPanel.CloseDSO();
|
||||
}
|
||||
_MyLog.WarnFormat("frmVEPROMS_FormClosing");
|
||||
//_MyLog.WarnFormat("frmVEPROMS_FormClosing");
|
||||
if (MyParent == null)
|
||||
{
|
||||
if (MyActivityTimer != null) MyActivityTimer.Dispose();
|
||||
|
@ -1240,9 +1240,22 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
else
|
||||
myDoc.PageSetup.RightMargin = newRight;
|
||||
myDoc.PageSetup.BottomMargin = newBottom;
|
||||
myDoc.PageSetup.LeftMargin = newLeft;
|
||||
myDoc.PageSetup.TopMargin = newTop;
|
||||
try // B2017-138 Add error handling for setting Bottom Margin
|
||||
{
|
||||
myDoc.PageSetup.BottomMargin = newBottom;
|
||||
myDoc.PageSetup.LeftMargin = newLeft;
|
||||
myDoc.PageSetup.TopMargin = newTop;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (_MySection != null)
|
||||
{
|
||||
_MyLog.ErrorFormat("<<< ERROR >>> MSWord could not set margins\r\n==>'MSWord could not set margins',{0},'{1}','{2}'"
|
||||
, _MySection.ItemID, _MySection.MyDocVersion.MyFolder.Name, _MySection.ShortPath);
|
||||
}
|
||||
else
|
||||
_MyLog.ErrorFormat("Could not set margins {0}", myDoc.FullName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user