Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel / IE / Office Clipboard Automation

Status
Not open for further replies.

TomCarnahan

Programmer
Dec 7, 2002
123
US
I have an IE / Excel worksheet process that I am trying to automate via VBA.

Manually, the process looks like this:

1) Run a web report to get results list.
2) Since there is no way to convert to MS-Excel,
with the webpage in focus press CTRL-A, CTRL-C.

3) Select cell A1 in a blank worksheet.

4) Paste the contents of the Office clipboard into the Excel sheet.

5) Manually clean up the report since it does not come through properly formatted.

What I would like to do is some or all of the following:

a) Via message, tell the user to select his web site.
b) With the web page in focus, press CTRL-A (select all) and CTRL-C to copy the contents.
c) With cell A1 selected in the blank work sheet, press CTRL-V (paste)
d) Spend the next day or two cleaning up and formatting the report.

Does anyone know how to use EXCEL VBA to initiate a Office Clipboard copy in an external document (this case, a web page); then paste the data into the blank spread sheet without losing formatting?
Any help would be appreciated. ;-)




--- Tom




--- Tom
 
Tom.

Have a look at the end keys commands, they're not pretty but they serve a purpose, Also with the formatting is it the same each time, if so then think about recording yourslef doing the formating then using the code that is generated to cut down on some of the leg work later.
 
Will the "sendkey" commands generated in an instance of MS-Access control a CTRL-C (copy) in an instance of IE?

If so, is there a special way to do it? How do you get Access VBA to bring the IE window in focus?

Thanks!

--- Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top