Hi,

I am writing a program in C# where user uploads a .rtf file with some predefined bookmarks. Is it possible to insert text at the specified bookmarks through code and allow user to download the updated .rtf file?

Thanks.

Yes. Parse through the file building a string (the file contents) then if the bookmark keyword is encountered insert the 'special' text into the string, and carry on with the file/string building.

Thanks for your reply. Is it also possible to insert tables into rich text box? Have been searching for a while but haven't found any useful resource.

Thanks for your reply. Is it also possible to insert tables into rich text box? Have been searching for a while but haven't found any useful resource.

Not very easily. You might be better using a web browser plugin and loading a table html if you want an easy markup-language style table. Apperantly you can copy a table out of word and into a rich text box, but making one programatically has some problems for some reason. Could be a glitch in the control?

I tried to create a .rtf document using Word(2010) and load it in a rich text box (using LoadFile()), but all the bookmarks as well as header and footer were lost. Is there a way to retain these?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.