Value cannot be null. Parameter name: value

2 posts, 0 answers
  1. ALEX
    ALEX avatar
    61 posts
    Member since:
    Feb 2011

    Posted 13 Jan 2017 Link to this post

    Hi Team,

               I'm facing this error "Value cannot be null. Parameter name: value" when i import the "docx" to richtextbox. I refer this Link for sample code. I can read below code for some file but some are not.

    Here is sample Code

    private void button1_Click(object sender, EventArgs e)
        RadDocument document = new RadDocument();
        IDocumentFormatProvider provider = new DocxFormatProvider();
        OpenFileDialog openDialog = new OpenFileDialog();
        openDialog.Filter = "Documents|*.docx";
        openDialog.Multiselect = false;
        DialogResult dialogResult = openDialog.ShowDialog();
        if (dialogResult ==  System.Windows.Forms.DialogResult.OK)
            using (Stream stream = openDialog.OpenFile())
                document = provider.Import(stream);
                radRichTextBox1.Document = document;


    I do not know this is the file issue or not. I'm using V2011.3.11.1219 WinForms. I attached the file that can not read from code. You need to change the extension to docx.




  2. Hristo
    Hristo avatar
    1508 posts

    Posted 13 Jan 2017 Link to this post

    Hello Alex,

    Thank you for writing.

    Please note that the old RadRichTextBox control is now deprecated. Please upgrade to use RadRichTextEditor which has no issues opening the file.

    I hope this helps. Should you have further questions please do not hesitate to write back.

    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top