Tom
Wed Dec 03 15:11:05 CST 2003
I haven't done a lot of testing, but this script fragment
seems to do what you want ...
With CreateObject("InternetExplorer.Application")
.Navigate "
http://www.microsoft.com"
do until .ReadyState = 4 : Wscript.Sleep 100 : Loop
.visible = true
With .document
.execcommand "SelectAll"
.execcommand "Copy"
end with ' document
With CreateObject("Word.Application")
.Visible = True
Set NewDoc = .Documents.Add
.Selection.Paste
End with
.visible = false
End with
(I pasted it together from past of a couple of other
scripts I had laying around.
Tom Lavedas
===========
>-----Original Message-----
>I want to perform the following "actions" with a vbs
script.
>
>1)Start Internet Explorer
>2)Start MS Word
>3)Navigate to a specified page http
>4)Select a part of this page (text+formatting and images)
>5)Copy it
>6)Paste it to a Word document
>
>Is it possible?
>My problem is how to select+copy and past via vbs as if
in interactive
>mode (points 4-6).
>In spite of many attempt to find something useful on
Google Groups, I
>couldn't find anything clear about it...
>
>
>Nicola Attico
>Rome, Italy
>.
>