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-bounces@leafe.com On Behalf Of AndyHC Sent: 07 February 2022 07:19 To: profoxtech@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.hudl@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:
- I want it to work with the current/open editing window
- 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]