Pasting email address from Outlook then exporting causes exception

4 posts, 0 answers
  1. Shaun
    Shaun avatar
    31 posts
    Member since:
    Jul 2011

    Posted 13 Apr Link to this post


    I have noticed what appears to be a bug.

    How to repeat:

    1. Copy any email address from the body of an Outlook Email (Outlook 2013).

    2. Paste the email address into the radrichtextbox.

    3. Save the content via code below;

     Dim fp As New RtfFormatProvider
     Dim Result As String = fp.Export(rtb.Document) <<< exception occurs

    Exception Details:

    "The given key was not present in the dictionary."

    Stack Trace:

    at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
       at Telerik.Windows.Documents.FormatProviders.Rtf.Export.RtfDocumentExporter.ExportSpanProperties(SpanProperties spanProps, ExportContext context, RtfWriter writer)
       at Telerik.Windows.Documents.FormatProviders.Rtf.Export.RtfDocumentExporter.ExportSpanProperties(Span span)
       at Telerik.Windows.Documents.FormatProviders.Rtf.Export.RtfDocumentExporter.ExportSpan(Span span)
       at Telerik.Windows.Documents.FormatProviders.Rtf.Export.RtfDocumentExporter.ExportInline(Inline inline)
       at Telerik.Windows.Documents.FormatProviders.Rtf.Export.RtfDocumentExporter.ExportFieldFragment(DocumentFragment fragment)
       at Telerik.Windows.Documents.FormatProviders.Rtf.Export.RtfDocumentExporter.ExportCodeBasedFieldRangeStart(FieldRangeStart fieldStart)
       at Telerik.Windows.Documents.FormatProviders.Rtf.Export.RtfDocumentExporter.ExportFieldRangeStart(FieldRangeStart rangeStart)
       at Telerik.Windows.Documents.FormatProviders.Rtf.Export.RtfDocumentExporter.ExportInline(Inline inline)
       at Telerik.Windows.Documents.FormatProviders.Rtf.Export.RtfDocumentExporter.ExportParagraph(Paragraph paragraph)
       at Telerik.Windows.Documents.FormatProviders.Rtf.Export.RtfDocumentExporter.ExportBlock(Block block)
       at Telerik.Windows.Documents.FormatProviders.Rtf.Export.RtfDocumentExporter.ExportSection(Section section)
       at Telerik.Windows.Documents.FormatProviders.Rtf.Export.RtfDocumentExporter.ExportDocument()
       at Telerik.Windows.Documents.FormatProviders.Rtf.Export.RtfDocumentExporter.Export()
       at Telerik.Windows.Documents.FormatProviders.Rtf.RtfFormatProvider.Export(RadDocument document, Stream output)
       at Telerik.Windows.Documents.FormatProviders.Rtf.RtfFormatProvider.Export(RadDocument document)


    If any more information is required please let me know and I will provide what I can.


    Kind Regards,



  2. Boby
    Boby avatar
    586 posts

    Posted 14 Apr Link to this post

    Hi Shaun,

    This is known issue. You can follow its item on our public portal to get notification for any status changes here:
    Document with hyperlink pasted from Outlook throws exception on export to RTF

    In the meantime, you can try the workaround from the item, namely to manually register style  corresponding to the Outlook hyperlink style:
    var style = new StyleDefinition("test", StyleType.Character);
    style.SpanProperties.ForeColor = Color.FromArgb(100, 200, 25, 104);

    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. DevCraft R3 2016 release webinar banner
  4. Shaun
    Shaun avatar
    31 posts
    Member since:
    Jul 2011

    Posted 14 Apr in reply to Boby Link to this post

    Thanks for the update Boby I will follow the issue.
  5. Shaun
    Shaun avatar
    31 posts
    Member since:
    Jul 2011

    Posted 14 Apr in reply to Boby Link to this post

    Thanks for the update Boby I will follow the issue on the portal.
Back to Top