|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Convert RTF Text to Plain TextHi,
I have written a little Windows Service which converts tons of RTF docs from RTF to Plain Text. I using the winform rtfbox. How ever sometimes this crahses in background. Does anybody know a better way? 3rd Party control or what ever? Thanks in advance Anthony -- Anthony Malt Total guess here... but .NET doesn't bother to do stuff like create Win32
handles and things like that until you actually *display* the window. This poses a problem for ActiveX controls. For instance, this led to problems with the WebBrowser control in 2003. If you instantiated a form that contained a web browser, but kept it hidden and never showed it (like because the user never switched to it in your "tabbed" application) it would crash your application when you exited. Try showing the form... possibly offscreen (.Left = 0 - .Width, etc). Then doing the work. I'm not sure how this plays out if your app is running as a Windows "Service." I think you can still "Show" Windows (just nobody sees them)... but, I'm not sure about that. As a work around... every thought of using Word to do the dirty? Word has a very good object model which would allow you to do this (basically as simple as wd=CreateObject (or whatever it is in .NET), wd.OpenFile(rtffile) wd.SaveAs(textfile)) Show quoteHide quote "Anthony Malt" <Anthony.M***@sterm.com> wrote in message news:uka1LhLMGHA.3272@tk2msftngp13.phx.gbl... > Hi, > > I have written a little Windows Service which converts tons of RTF docs > from RTF to Plain Text. I using the winform rtfbox. How ever sometimes > this crahses in background. > > Does anybody know a better way? 3rd Party control or what ever? > > Thanks in advance > Anthony > > -- > Anthony Malt > "Anthony Malt" <Anthony.M***@sterm.com> wrote in message If you have Word, why not use that? IME it will work fine and is easy to news:uka1LhLMGHA.3272@tk2msftngp13.phx.gbl... > I have written a little Windows Service which converts tons of RTF docs > from RTF to Plain Text. I using the winform rtfbox. How ever sometimes > this crahses in background. > > Does anybody know a better way? 3rd Party control or what ever? automate.
filesystem.getfiles question
BackGroundWorker.ProgressChanged "Cross-thread operation not valid" at 2nd/3th/... progress sleep? datagrid entry with no db components control disable byref and byvalue Looking for graphic controls to use in .NET VS2005 Buiild Options compiles as a form -- but not as a control Start Process |
|||||||||||||||||||||||