We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Exception when Create WordDocument with Text file

HI!

I tried to create document with different type (.doc, .docx and .txt) of file. The .doc and .docx are OK, but I got exception with .txt

Thanks!

~~~~~~~~~~~~~~

string path4 = @"C:\TextFile.txt";
try
{
//Tried with both FormatType, and got the same result
// WordDocument document4 = new WordDocument(path4, FormatType.Txt);
WordDocument document4 = new WordDocument(path4, FormatType.Automatic);
}
catch (Exception ex)
{
int i = 1;
}

I got Exception below:

[System.IndexOutOfRangeException] = {"Index was outside the bounds of the array."}

StackTrace = " at Syncfusion.DocIO.DLS.TextConverter.Read(StreamReader reader, IWordDocument document)\r at Syncfusion.DocIO.DLS.WordDocument.OpenTxt(Stream stream)\r at Syncfusion.DocIO.DLS.WordDocument.Open(String fileName, FormatType formatType, String pass...




1 Reply

RA Rajendran Syncfusion Team September 16, 2010 01:16 PM UTC

Hi Kim,

Thank you for using Syncfusion products.

We were able to reproduce the mentioned issue with "Index was outside the bounds of the array" exception with few other text documents during text to word conversion but we have fixed this issue internally in our latest source.

Could you please report this issue along with your sample text document through Direct Trac Developer Support System?
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents so that we can ensure the fix for your sample document and provide you with the patch for this issue as well as you can take the advantage of the expertise of a dedicated support engineer and a guaranteed response time and we hope you will take advantage of this system as well. If you have already reported, please ignore this.

Please let us know if you have any other questions.

Regards
Rajendran



Loader.
Live Chat Icon For mobile
Up arrow icon