How to save page?

Add-in Express™ Support Service
That's what is more important than anything else

How to save page?
 
Omri Suissa




Posts: 137
Joined: 2011-10-17
Hi,
In office i can use the save method on the active object (for example AddinModule.CurrentInstance.WordApp.ActiveDocument.SaveAs...) how can i do it on IE?

Thanks,
Omri
Posted 29 Nov, 2011 06:42:09 Top
Andrei Smolin


Add-in Express team


Posts: 17166
Joined: 2006-05-11
Hello Omri,

Do you need to save the current web page? If so, an example of how to do this is given in How To Programmatically Save an HTML Page to Disk. See the C++ code on that page. Note that you may be required to deal with Protected Mode, see Deal with Protected Mode API in Internet Explorer 7 and IE8.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 29 Nov, 2011 07:26:55 Top
Omri Suissa




Posts: 137
Joined: 2011-10-17
Hi Andrei,
Thanks for your help but the method that you wrote saves the page only, what i'm looking for is to save it as IE saves it (with all the external files) when you save "webpage, complete". that why i asked if there is a way to do it with IE api.

Omri
Posted 29 Nov, 2011 10:37:56 Top
Andrei Smolin


Add-in Express team


Posts: 17166
Joined: 2006-05-11
Hi Omri,

I've found this CodeProject post - Automated IE SaveAs MHTML. It describes how you use Windows API to manipulate the SaveAs dialog. The article is somewhat old and it is written in C++ but headers in comments are most promising.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 30 Nov, 2011 01:51:38 Top
Omri Suissa




Posts: 137
Joined: 2011-10-17
Thanks for the help :)
Posted 30 Nov, 2011 05:57:57 Top