WordsProcessing - Value cannot be null.\r\nParameter name: data

2 posts, 0 answers
  1. Jack
    Jack avatar
    3 posts
    Member since:
    Dec 2012

    Posted 24 Oct 2014 Link to this post

    Hello, I'm using UI for Winforms on a VSTO outlook plug-ins project. Some Email save to word doc without a problem but some get this error - "Value cannot be null.\r\nParameter name: data".

    Here is my code.

    var saveAsWord = new SaveAsWord(filePath, _Mail.HTMLBody, _Mail.Subject);
    saveAsWord.SaveToWord();


    public void SaveToWord()
            {
                try
                {
                    var provider = new HtmlFormatProvider();
                    RadFlowDocument document = provider.Import(TextBody);
                    var providerDocx = new DocxFormatProvider();
                    using (Stream output = new FileStream(SaveFileTo, FileMode.OpenOrCreate))
                    {
                        providerDocx.Export(document, output);
                    }
                }
                catch (Exception ex)
                {
                    LogError.LogErrorMessage(ex);                
                }            
            }
  2. Petya
    Admin
    Petya avatar
    975 posts

    Posted 29 Oct 2014 Link to this post

    Hello Jack,

    As we discussed in the support ticket you started on the matter, the error is related to a problem in the import functionality of RadWordsProcessing. Here is the public item concerning this where you can follow its status.

    Let us know if you are still experiencing issues with the library.

    Regards,
    Petya
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top