This commit is contained in:
parent
065483682a
commit
34c1bb5243
@ -52,6 +52,7 @@ namespace DataLoader
|
|||||||
if (System.IO.File.Exists(fname))
|
if (System.IO.File.Exists(fname))
|
||||||
{
|
{
|
||||||
FileInfo myFile = new FileInfo(fname);
|
FileInfo myFile = new FileInfo(fname);
|
||||||
|
frmMain.AddError("Processing {0}", fname);
|
||||||
//string tmpName = @"C:\Temp\DataLoader\" + myFile.Name.Replace(".", "_") + ".RTF";
|
//string tmpName = @"C:\Temp\DataLoader\" + myFile.Name.Replace(".", "_") + ".RTF";
|
||||||
string tmpName = Path.GetTempFileName();
|
string tmpName = Path.GetTempFileName();
|
||||||
string temppath = Path.GetTempFileName();
|
string temppath = Path.GetTempFileName();
|
||||||
@ -94,7 +95,15 @@ namespace DataLoader
|
|||||||
// if need landscape set too: bool landscape = (stype[1] == 'L');
|
// if need landscape set too: bool landscape = (stype[1] == 'L');
|
||||||
myWordDoc.SetLineSpacing(lpi); // if need landscape set too: , landscape); ;
|
myWordDoc.SetLineSpacing(lpi); // if need landscape set too: , landscape); ;
|
||||||
}
|
}
|
||||||
float docLen = myWordDoc.Length;
|
float docLen = 1.0f;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
docLen = myWordDoc.Length;
|
||||||
|
}
|
||||||
|
catch (Exception ex1)
|
||||||
|
{
|
||||||
|
frmMain.AddError("Length Exception {0}\r\n\r\n{1}", ex1.Message, ex1.StackTrace);
|
||||||
|
}
|
||||||
if (ci == null) ci = new ConfigInfo(null);
|
if (ci == null) ci = new ConfigInfo(null);
|
||||||
ci.AddItem("Printing", "Length", string.Format("{0:0.0000}", docLen));
|
ci.AddItem("Printing", "Length", string.Format("{0:0.0000}", docLen));
|
||||||
string ascii = myWordDoc.MyWordDoc.Ascii;
|
string ascii = myWordDoc.MyWordDoc.Ascii;
|
||||||
@ -114,6 +123,7 @@ namespace DataLoader
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
//frmMain.AddError(ex, "SaveWordDoc");
|
//frmMain.AddError(ex, "SaveWordDoc");
|
||||||
|
frmMain.AddError("Convert Exception {0}\r\n\r\n{1}", ex.Message, ex.StackTrace);
|
||||||
if (attempt == 1)
|
if (attempt == 1)
|
||||||
frmMain.AddError("vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv");
|
frmMain.AddError("vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv");
|
||||||
else
|
else
|
||||||
@ -125,6 +135,7 @@ namespace DataLoader
|
|||||||
log.ErrorFormat("oldstepsequence = {0}", fname);
|
log.ErrorFormat("oldstepsequence = {0}", fname);
|
||||||
log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
|
log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
|
||||||
log.ErrorFormat(ex.StackTrace);
|
log.ErrorFormat(ex.StackTrace);
|
||||||
|
MSWordToPDF.CloseApp();
|
||||||
switch (attempt)
|
switch (attempt)
|
||||||
{
|
{
|
||||||
case 1: // Covert using RTB
|
case 1: // Covert using RTB
|
||||||
|
Loading…
x
Reference in New Issue
Block a user