fixed problem saving margins in word attachment – can’t do if in a frame
sometines would get a weird file name for the opened word attachment
This commit is contained in:
@@ -526,6 +526,9 @@ namespace VEPROMS.CSLA.Library
|
||||
//ItemInfo sect = doc.DocumentEntries[0].MyContent.ContentItems[0];
|
||||
return ToPDFReplaceROs(sect, false, roids);
|
||||
}
|
||||
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public static string ToPDFReplaceROs(ItemInfo sect, bool openPdf, List<string> roids) //, System.Drawing.Color overrideColor, System.Windows.Forms.Form myForm)
|
||||
{
|
||||
string fileName = GetFileName(sect);
|
||||
@@ -574,7 +577,14 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
LBDocumentClass myDoc = MyApp.Documents.Open(myFile.FullName, false);
|
||||
AdjustMargins(myDocStyle, myDoc, true);
|
||||
try
|
||||
{
|
||||
AdjustMargins(myDocStyle, myDoc, true);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_MyLog.Error("Could not Adjust Margins",ex);
|
||||
}
|
||||
LBSelection selxy = hasRos ? FindXyPlot() : null;
|
||||
while (selxy != null)
|
||||
{
|
||||
@@ -733,10 +743,13 @@ namespace VEPROMS.CSLA.Library
|
||||
//Console.WriteLine("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9}", newTop, newLeft, newLength, newWidth, oldTop, oldLeft, oldBottom, oldRight,oldHeight,oldWidth);
|
||||
if (printingMode)
|
||||
{
|
||||
myDoc.PageSetup.BottomMargin = 0;// 11 * 72 - (newTop + newLength);
|
||||
myDoc.PageSetup.RightMargin = newRight;
|
||||
myDoc.PageSetup.LeftMargin = newLeft;
|
||||
myDoc.PageSetup.TopMargin = newTop;
|
||||
if (myDoc.PageSetup.BottomMargin != 9999999)
|
||||
{
|
||||
myDoc.PageSetup.BottomMargin = 0; // 11 * 72 - (newTop + newLength);
|
||||
myDoc.PageSetup.RightMargin = newRight;
|
||||
myDoc.PageSetup.LeftMargin = newLeft;
|
||||
myDoc.PageSetup.TopMargin = newTop;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user