LOCAL lcFile >>lcFile = GETFILE("prg") >> >>MODIFY COMMAND (lcFile) NOWAIT >> >>* Select all >>SYS(1500, '_MED_SLCTA ', '_MEDIT') && Select All menu item >> >>* Copy >>SYS(1500, '_MED_COPY ', '_MEDIT') && Copy menu item>>
LOCAL loIE as "InternetExplorer.Application" loIE = CREATEOBJECT("InternetExplorer.Application") #DEFINE READYSTATE_COMPLETE 4 #DEFINE MAX_TIME 30 #DEFINE OLECMDID_PASTE 13 #DEFINE OLECMDEXECOPT_DODEFAULT 0 local lcInnerHTML && HTML of the webpage local lnStarted && Seconds when started loading local lnWaiting && Seconds waiting for the document to load local lcRetVal && Return Value lnStarted = SECONDS() lcUrl = "about:blank" loIE.navigate(lcUrl) loIE.Visible = .T. * * Wait till page totally loaded DO WHILE loIE.Readystate <> READYSTATE_COMPLETE or lnWaiting >= MAX_TIME lnWaiting = SECONDS() - lnStarted ENDDO * Make the page editable loIE.Document.Body.contentEditable = .T.And select the IE window, and click "CTRL+V" to Paste the contents, and you'll see all the formatting preserved.