Windows 10: RichTextBox.RTF setter throwing System.ArgumentException. File format is not valid in...

Discus and support RichTextBox.RTF setter throwing System.ArgumentException. File format is not valid in... in Windows 10 Installation and Upgrade to solve the problem; Prior conditions: Issue is coming with windows version 1803 Enable Beta: unicode UTF-8 for world wide language support (To enable Start => Region &... Discussion in 'Windows 10 Installation and Upgrade' started by M V Sreedhar, Apr 23, 2019.

  1. RichTextBox.RTF setter throwing System.ArgumentException. File format is not valid in...


    Prior conditions:

    • Issue is coming with windows version 1803
    • Enable Beta: unicode UTF-8 for world wide language support (To enable Start => Region & Language settings => Related settings -> Additional date, time & regional settings => Region -> Change date, time or number formats => select Administrative tab => Click on Change System Locale.. => Check Beta: unicode UTF-8 for world wide language support checkbox
    • Restart the system
    • In Windows forms Application => Add a form , RichTextBox, Button and a label
    • OnButtonClick => add below lines

    richTextBox1.SelectAll();

    richTextBox1.Rtf = richTextBox1.SelectedRtf; //Leads Crash System.ArgumentException: File format is not valid.

    label1.Text = "RichTextBox1.Rtf = " + richTextBox1.Rtf;

    • If we UnCheck Beta: unicode UTF-8 for world wide language support, and restart the system there was no issue
    • The above scenario is simulated to reproduce the crash
    • Any help on this use case is appreciated

    :)
     
    M V Sreedhar, Apr 23, 2019
    #1
  2. Xylee Del Win User

    rtf. file

    Hi Michelle,

    Some documents when saved takes up space due to its components. For us to help you with your concern, we'd like to know if your rtf file has images on it.

    Meanwhile, if your rtf file has pure texts, we suggest that you follow the steps below to reduce the size of your rtf file:

    • Compose your rtf file in Microsoft Word.
    • Instead of saving, copy and paste your composition to WordPad. All the formatting is copied over too.
    • Save the document with WordPad, and you'll get a significantly smaller file.

    Let us know the results.
     
    Xylee Del, Apr 23, 2019
    #2
  3. boyvinbab Win User
    .rtf file in C7

    rtf format files can be opened through word pad......

    then copy the content and paste it in a text or word file......

    if u find this useful..hit kudo button....
     
    boyvinbab, Apr 23, 2019
    #3
  4. HVWB Win User

    RichTextBox.RTF setter throwing System.ArgumentException. File format is not valid in...

    Cannot select Wordpad as default for .rtf files

    I am running windows 10. When I go into settings>apps & features and look for Wordpad it is not listed. If I go to settings>default apps>Choose default apps by file type and find the rtf file type and click on it wordpad is NOT listed. Yet I can go to
    my windows app list under Windows Accessories and wordpad is listed. I can launch it and create files so it is installed. If I click on the rtf file that was just created from wordpad it will not launch Wordpad. How can I correct this problem?
     
Thema:

RichTextBox.RTF setter throwing System.ArgumentException. File format is not valid in...

Loading...
  1. RichTextBox.RTF setter throwing System.ArgumentException. File format is not valid in... - Similar Threads - RichTextBox RTF setter

  2. Windows 11 + .rtf formats

    in Windows 10 Gaming
    Windows 11 + .rtf formats: Hi all - I've just bought a Windows laptop having been a Mac user for many years. There is a piece of software I use for work that exports certain reports as Rich Text Format .rtf documents, rather than eg in Word. You can ONLY export them in .rtf, and there is no option to...
  3. Windows 11 + .rtf formats

    in Windows 10 Software and Apps
    Windows 11 + .rtf formats: Hi all - I've just bought a Windows laptop having been a Mac user for many years. There is a piece of software I use for work that exports certain reports as Rich Text Format .rtf documents, rather than eg in Word. You can ONLY export them in .rtf, and there is no option to...
  4. Cannot open .RTF file.

    in Windows 10 Installation and Upgrade
    Cannot open .RTF file.: Cannot open a RTF file. in settings>Apps>Default apps>Choose apps by file type>RTF Default choices are: Libra Writer; OpenOfice Calc; OpenOffice Calc; look for App in MS store OpenOffice Writer is not an option as a default. This happened when I tried to open .RTF file...
  5. xlsx file formats not valid

    in Windows 10 Gaming
    xlsx file formats not valid: i have files that i lost on a external drice i have recovered them but try to open and i get xlsx file formats not valid i have tried all steps that i have read up on with no results im stumped is there any other steps or solutions that i may try...
  6. xlsx file formats not valid

    in Windows 10 Software and Apps
    xlsx file formats not valid: i have files that i lost on a external drice i have recovered them but try to open and i get xlsx file formats not valid i have tried all steps that i have read up on with no results im stumped is there any other steps or solutions that i may try...
  7. Outlook emails: any drawbacks of changing to RTF format?

    in Microsoft Office and 365
    Outlook emails: any drawbacks of changing to RTF format?: Outlook 365 File > Options > Mail: Compose messages "Compose messages in this format:" - currently this is set to HTML Q: what are the drawbacks when this is set to Rich Text (RTF) ? The only drawback I know of is there are no (graphic) message separators when replying to...
  8. The RTF file is gone

    in Windows 10 Ask Insider
    The RTF file is gone: Hi. Today i saved some data in a rtf file. Suddenly my pc crashed and i restarted and now all the text is gone! It shows 0 bytes. It originally had 2 MB. How can i recover the whole content? It's gone forever? submitted by /u/jimijoop [link] [comments]...
  9. Corrupt RTF file

    in Windows 10 Network and Sharing
    Corrupt RTF file: Unfortunately, a PC mishap caused an .RTF file to become badly corrupted. It is still relatively sizeable, so I would be under the assumption that some content is still there. The size may be due to the number of dodgy lines that are displayed in the file. But what I would...
  10. RTF file corrupted

    in Windows 10 Network and Sharing
    RTF file corrupted: I have been writing an RTF file for one year now, and I got home from a trip to discover that the entire thing was corrupted. I opened the file and it was blank. Still had highlightable text and the correct length, as if it was all spaces. Once I opened it and found this I...

Users found this page by searching for:

  1. file format not valid exceptio for rtf on windows form