c1Editor get filename

Posted by: gessi on 20 March 2018, 6:59 pm EST

    • Post Options:
    • Link

    Posted 20 March 2018, 6:59 pm EST

    hi

    When I’m using c1Editor and I saved the rtf-document how can I get the filename of this document by code?

    best regards

    Peter

  • Posted 21 March 2018, 4:57 pm EST

    Hello Peter,

    As per our understanding, you wish to display the name of the rtf file just saved from the C1Editor. For this, you can use the below mentioned code snippet:

    
    string pattern = "*.rtf";
    var dirInfo = new DirectoryInfo("../../");
    var file = (from f in dirInfo.GetFiles(pattern) orderby f.LastWriteTime descending select f).First();
    MessageBox.Show(file.Name);  
    
    

    A sample using the same has been attached for your reference.

    If this does not satisfy your requirement, kindly elaborate on it a bit further so that we assist you accordingly.

    Best Regards,

    Esha

    prj_C1Editor_RTFSaving.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels