By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,476 Members | 1,529 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,476 IT Pros & Developers. It's quick & easy.

Copy header and description from explorer link and paste it in excel

P: 1
Hi,

I need to copy and paste only header and description from explorer link. Below link extracts all test on explorer.

Expected Results as below-
Kolkata gets best cities award for tackling climate change

Kolkata, along with 10 other cities from across the globe, has been honoured with the best cities of 2016 award in recognition of its programme on solid waste management.

Kolkata, the only Indian city to win the honour, received the award during the C40 Mayors Summit held in Mexico. Other cities which won the award include Copenhagen, Sydney, and Paris.

So, let's discuss some questions related to this post:
Q1. Name of the Indian city honoured with the best cities of 2016 award in recognition of its programme on solid waste management?
Ans1. Kolkata



=================================
VBA Script
=================================
Sub Test()
Dim IE As Object

Set IE = CreateObject("InternetExplorer.Application")
With IE
.Visible = True
.Navigate "http://currentaffairs.adda247.com/2016/12/kolkata-gets-best-cities-award-for.html" ' should work for any URL
Do Until .ReadyState = 4: DoEvents: Loop

x = .document.body.innertext
x = Replace(x, Chr(10), Chr(13))
x = Split(x, Chr(13))
Range("A1").Resize(UBound(x)) = Application.Transpose(x)

.Quit
End With

End Sub
==================================
Dec 6 '16 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.