Counting Lines & Spaces In Uploading
if (FileUpload1.HasFile)
{
FileUpload1.SaveAs("C:\\Documents and Settings\\user155\\Desktop\\navas\\" + FileUpload1.FileName);
}
Microsoft.Office.Interop.Word.Application ObjWord = new Microsoft.Office.Interop.Word.Application();
object falseValue = false;
object trueValue = true;
object missing = Type.Missing;
object saveobjections = Microsoft.Office.Interop.Word.WdSaveOptions.wdDoNotSaveChanges;
Microsoft.Office.Interop.Word.Document wrdoc;
object filepath = ("C:\\Documents and Settings\\user155\\Desktop\\navas\\" + FileUpload1.FileName);
wrdoc = ObjWord.Documents.Open(ref filepath, ref missing, ref trueValue, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
Response.Write(wrdoc.ComputeStatistics(Microsoft.Office.Interop.Word.WdStatistic.wdStatisticLines, ref missing));
ObjWord.Documents.Close(ref saveobjections, ref missing, ref missing);
ObjWord.Quit(ref saveobjections, ref missing, ref missing);
this coding counting lines withspace while uploading doc file. i want ocunting lines without space?
{
FileUpload1.SaveAs("C:\\Documents and Settings\\user155\\Desktop\\navas\\" + FileUpload1.FileName);
}
Microsoft.Office.Interop.Word.Application ObjWord = new Microsoft.Office.Interop.Word.Application();
object falseValue = false;
object trueValue = true;
object missing = Type.Missing;
object saveobjections = Microsoft.Office.Interop.Word.WdSaveOptions.wdDoNotSaveChanges;
Microsoft.Office.Interop.Word.Document wrdoc;
object filepath = ("C:\\Documents and Settings\\user155\\Desktop\\navas\\" + FileUpload1.FileName);
wrdoc = ObjWord.Documents.Open(ref filepath, ref missing, ref trueValue, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
Response.Write(wrdoc.ComputeStatistics(Microsoft.Office.Interop.Word.WdStatistic.wdStatisticLines, ref missing));
ObjWord.Documents.Close(ref saveobjections, ref missing, ref missing);
ObjWord.Quit(ref saveobjections, ref missing, ref missing);
this coding counting lines withspace while uploading doc file. i want ocunting lines without space?
No comments:
Post a Comment