Jon
Sat Aug 20 15:33:55 CDT 2005
excellent resource.
This thread just keeps getting better and better :)
"James Whitlow" <jwhitlow@letter.com> wrote in message
news:%23Y1g$RbpFHA.1968@TK2MSFTNGP14.phx.gbl...
> "Jon Paal" <Jon nospam Paal @ everywhere dot com> wrote in message
> news:uHOI86PpFHA.3760@TK2MSFTNGP10.phx.gbl...
>> can vbscript retrieve the clipboard contents ?
>>
>> I would like to sort it and paste it to back into an active document
>
> This thread contains some very useful information:
>
>
http://groups.google.com/group/microsoft.public.scripting.vbscript/browse_thread/thread/946ff5d0c26b12b6/49060196c0205131
>
> Basically, you could use something like this:
>
> '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> sText = CreateObject("htmlfile").parentWindow._
> clipboardData.getData("Text")
>
> 'Your sorting code goes here
>
> With Createobject("InternetExplorer.Application")
> .navigate "about:blank"
> Do Until .readyState = 4 : Wscript.Sleep 10 : Loop
> .document.parentWindow.clipboardData.setData "Text", sText
> End With
> '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>