Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

saveas wbesite html page into our PC at VBA excel

Avatar of duncanb7
duncanb7 asked on
Visual Basic ClassicHTML
6 Comments1 Solution1218 ViewsLast Modified:
Dear Expert,

I would like to save the wbesite as html file and save it in my PC .How Can I can do
that after the following code sub, "savewebsite". That is same operation when we save the website in IE window to our local PC dir and file  but now it is saving it at
VBA excel

THe question-1, how to save the file by saving  myie.document.innerhtml to example.html file when navigate is successfully  ?
The question-2 how to use myIe.execWB  OLECMDID_SAVEAS  to save the website
into html file on PC
The question-3, What or Why is different using myIE.doucment.innerhtml and execWB to save the website into file ?

Please advise

Sub savewebsite()
Dim myIE As SHDocVw.InternetExplorer  
Set myIE = CreateObject("InternetExplorer.Application")
with myIE
.Visible = True
 .navigate "www.yahoo.com"   
Do Until Not .Busy And .readyState = READYSTATE_COMPLETE Loop
    save code here
End with    
End sub
Avatar of nffvrxqgrcfqvvc
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answers