This is a migrated thread and some comments may be shown as answers.

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

1 Answer 152 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jack
Top achievements
Rank 1
Jack asked on 24 Oct 2014, 10:01 PM
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);                
            }            
        }

1 Answer, 1 is accepted

Sort by
0
Petya
Telerik team
answered on 29 Oct 2014, 03:41 PM
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.

 
Tags
General Discussions
Asked by
Jack
Top achievements
Rank 1
Answers by
Petya
Telerik team
Share this question
or