Hi Andy, thanks for your reply. Yes but that displays the rendered RTF and I want to work with the underlying RTF (including the various tags - e.g. font name, size, weight, style, colour etc)
Paul -----Original Message----- From: ProfoxTech <profoxtech-boun...@leafe.com> On Behalf Of AndyHC Sent: 07 February 2022 07:19 To: profoxt...@leafe.com Subject: Re: Copy contents of code/editor window with formatting I don't know about automating it but this seems to work in the edit window: Ctl_A Ctl_C -> in e.g. Word - Ctl_V - save as type .rtf On 07-Feb-22 5:19 AM, paul.newton.h...@gmail.com wrote: > Hi all > > > > I am trying to copy the contents of the editing window that is > currently active (i.e. that I am editing) as text with its RTF > formatting code. What I have got (cribbed) so far is this: > > > > SET LIBRARY TO (HOME()+"Foxtools.FLL") > > nWHAND =_EDOPENFIL("TEST.PRG", 1) > > nEDstart = _EDSKIPLIN(m.nWHAND,0,0) > > nEDend = _EDSKIPLIN(m.nWHAND,0,10) > > = _EDSELECT(m.nWHAND, m.nEDstart, m.nEDend) > > = _EDCOPY(m.nWHAND) > > = _EDCLOSEFI(m.nWHAND, 0) > > > > This works fine insofar as I can paste the code into Word and see that > the code highlighting is correct. But there are a couple of issues I > haven't yet been able to resolve: > > > > 1. I want it to work with the current/open editing window > 2. I want to work with the underlying RTF, i.e. the text together with > the RTF formatting tags > > > > I expect to invoke the code to do this via a hotkey so that the window > that I am working on will be the active window. Any help or > suggestions would be much appreciated. Many thanks. > > > > Paul Newton > > > > --- StripMime Report -- processed MIME parts --- multipart/alternative > text/plain (text body -- kept) > text/html > --- > [excessive quoting removed by server] _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/005a01d81c1f$8c754850$a55fd8f0$@gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.