Macro to copy-paste web page to word

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
Is there a way to automate the process of copying and pasting a web page to
a word document? I have a macro which opens the active IE window as a word
document and then tries to search for a particular term in it. The macro
works fine with some web pages, but sometimes it does show the entire web
page contents( especially tables) when that web page is opened as a word
document. So I was wondering if there is a way to simply copy-paste the web
page into a word document instead of opening the web page as a word document.
I need a macro to do this.
Thanx.
 
Before you announce that you need a macro, you might try to define the
requirement a little. 'Web page' is a fairly nebulous concept these days:
what you get if you paste the page into Word depends on how that page is
generated and structured.

Is your objective to copy pages or to search for particular terms? And if
the latter, how will copying the page into Word will help? Why not use a
macro to do the searching? For that matter, why not use Google to do the
searching? -- you can specify that Google search only specific domains,
sites, or pages.
 
No.I think I haven't been very clear with what I'm trying to do. I'll try to
explain as best as I can.

I am creating a macro for editors. These editors have to frequently search
for terms when they are editing word documents.
I have a userform which has a textbox where the editors can type in the
term, select the search engine: Google, Google Scholar or Scirus , click the
search button and then the macro pulls up the appropriate page with the
search results.
After this the editors have to input the number of hits found in another
word document. Now I'm trying to automate this extraction of the number of
hits and paste them in the word document.
I have been able to do this properly as far as Google and Google Scholar are
concerned.
I simply open the Google or Scholar page as a word document, find the number
of hits using wild cards and then paste them in the other word document.
But when I try to open the Scirus search page in word, I don't get the
complete page. It just shows the Scirus toolbar on the top of the document.
That is why I was thinking maybe I could copy-paste the entire Scirus page
in a word document and then extract the total hits.
I know what I have right now may not be the best way to extract the number
of hits but I could find a way to do this otherwise.

Any help would be appreciated.
Thanx.
 
Back
Top