Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: How can i make IE9 save web pages in a default format

07 Apr 2011   #1
witelite

Windows 7 Ultimate Service Pack 1 Build 7601 32-bit
 
 
How can i make IE9 save web pages in a default format

I am running windows 7 ultimate (32 bit) edition and IE9. When I want to save a webpage I use this procedure;
1. LC on IE9 Menu Bar on File;
2. LC on "Save as", IE9 automatically defaults to "save as" option "Webpage Complete .htm/html option.
3. I have to manually select "Web Archive, single file .mht" format option, the LC on save.
4. Sometimes [in the same session] IE9 will remember to save as "Web Archive, single file .mht" format option, but if you change webpages it reverts back to the default "Webpage Complete .htm/html option.
5. A separate problem is getting IE9 to have a default save as location as it changes between various folders. I would like to make the default location as my desktop.
What I want to do is have some method of setting my default save as option similiar to what MS Word will let you do, under the following option;
>>>>File > Help > options > save > save files in this format.

I use the .mht format as it can be opened in any version of "Word" and I can edit the file including changing font type and size to suit me.
regards
witelite


My System SpecsSystem Spec
.

07 Apr 2011   #2
Mike Connor

Several, including Windows 7 x64 Ultimate
 
 

You can try the script given here;

Interests

from <http://utopia.knoware.nl/users/wvd_vegt/>

I have not tried it in IE9.


May also be of use, but I have not tried it at all;

http://www.ieaddons.com/en/details/T...T_Quick_Saver/


Regards....Mike Connor
My System SpecsSystem Spec
11 Apr 2011   #3
witelite

Windows 7 Ultimate Service Pack 1 Build 7601 32-bit
 
 
How can i make IE9 save web pages in a default format

Thanks for your reply Mike Connor.

Not sure if this helps as it is way beyond my computer knowledge, and also advise that I would have to buy the Chilkat Library.
regards
witelite

The link to http://utopia.knoware.nl/users/wvd_vegt/provides the following explanation by
Saturday, February 24, 2007 12:24 PMRichard Stallmann


I wrote an IE contextmenu extension that saves the current page in mht format. It relies on Chilkat MHT activex library, and since no x64 bit version exists (guess the developers are lazy, lol), I wrote two different scripts, one for x32 bit version, another for x64. Tested on Winxp SP2 x32 and Vista x64. You have to buy the Chilkat library to be able to use this extension, but you can try it until the trial period expires. The x64 bit version of the extension relies on the x32 bit version of wscript.exe, otherwise it obviously wouldn't work.
The mht file will be added to your "personal" folder, as defined in the registry of your windows installation:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders , string "personal"
In order to add this extension to IE, add the following to the registry (don't forget to adjust the path):
----------------------------------------------------------
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\SaveAsMHT]
"contexts"=hex:01
@="C:\\Program Files (x86)\\Internet Explorer\\IEExtensions\\ChilkatMHT.html"
----------------------------------------------------------

First, the x64 version (the x32 bit version is further down), it consists of two files, if you rename the ChilkatMHT.vbs file, don't forget to adjust the name in the html file.
Also, don't forget to allow the wscript.exe (x32 bit version) access to the internet in the Vista firewall.
If you change the name of the "Menuext" registry subkey, you have to adjust it in the html file too (see below)
1.1) ChilkatMHT.html:
----------------------------------------------------------
<SCRIPT LANGUAGE="VBSCRIPT">
myURL=external.menuArguments.location.href
pagetitle = external.menuArguments.document.title
Dim fso, half
Set fso = CreateObject("Scripting.FileSystemObject")
half = fso.GetFileName(external.menuArguments.location.href)
if InStr(half,".") then
s=InStr(half,".") -1
filename = Left(half, s)
filename = Replace(filename, "%20", "_")
Else filename = ""
End If
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
Set objWshSpecialFolders = WshShell.SpecialFolders
Mydocs2 = objWshSpecialFolders("MyDocuments")
if pagetitle > "" then
pagetitle = Replace(pagetitle, " ", "_")
pagetitle = Replace(pagetitle, "/", "_")
pagetitle = Replace(pagetitle, "\", "_")
pagetitle = Replace(pagetitle, ":", "_")
pagetitle = Replace(pagetitle, "|", "_")
pagetitle = Replace(pagetitle, "?", "_")
pagetitle = Replace(pagetitle, Chr(34), "_")
returntext = external.menuArguments.window.prompt ("Please provide the title" & vbCrLf & "(Empty Input or Cancel stop operation)",pagetitle)
Else returntext = external.menuArguments.window.prompt ("Please provide the title" & vbCrLf & "(Empty Input or Cancel stop operation)",filename)
End If
if returntext > "" then
Set oFSO = CreateObject("Scripting.FileSystemObject")
pathnameFull = oFSO.getParentFolderName(pathname)
Value = WshShell.RegRead ( "HKCU\Software\Microsoft\Internet Explorer\MenuExt\SaveAsMHT\" )
p=instrrev(Value,"\")
crap = right(Value,len(Value)-p)
Folder = Replace(Value, crap, "")
WshShell.Run("%windir%\SysWOW64\wscript.exe " & Chr(34) & Folder & "ChilkatMHT.vbs" & Chr(34) & " " & myURL & " " & Chr(34) & returntext & Chr(34) & " " & Chr(34) & Mydocs2 & Chr(34))
end if
</SCRIPT>
----------------------------------------------------------

1.2) ChilkatMHT.vbs:
----------------------------------------------------------
set WshShell = WScript.CreateObject("WScript.Shell")
Set objArgs = WScript.Arguments
myURL = objArgs.Item(0)
returntext = objArgs.Item(1)
Mydocs2 = objArgs.Item(2)
set mht = CreateObject("ChilkatMHT.ChilkatMHT.1")
mht.UnlockComponent("AnythingWorksFor30DayTrial") 'The serial goes here, once you buy it
mht.proxy = "127.0.0.1:89" 'Set Proxy
mht.EmbedImages = 1
'mht.WebsiteLogin = "" 'set website username if needed
'mht.WebsitePassword = "" 'set website password if needed
'msgbox mht.isunlocked 'check whether the library is unlocked (licensed)
Set oFSO = CreateObject("Scripting.FileSystemObject")
mht.GetAndSaveMHT myURL, Mydocs2 + returntext + ".mht"
'mht.savelasterror Mydocs2 + "1.txt" 'error output for debugging purposes
do until oFSO.FileExists(Mydocs2 & returntext & ".mht")
WScript.Sleep 100
loop
msgbox "Mission Accomplished!"
Set oFSO = Nothing
set mht = nothing
WScript.Quit

----------------------------------------------------------
The following code is for x32 bit versions of Windows:
ChilkatMHT.html :
----------------------------------------------------------
<SCRIPT LANGUAGE="VBSCRIPT">
set mht = CreateObject("ChilkatMht.ChilkatMht")

'if error is returned, try the following:
'set mht = CreateObject("ChilkatMHT.ChilkatMHT.1")

mht.UnlockComponent "AnythingWorksFor30DayTrial"
mht.proxy = "127.0.0.1:89" 'Set Proxy
mht.EmbedImages = 1
'mht.WebsiteLogin = ""
'mht.WebsitePassword = ""
myURL=external.menuArguments.location.href
pagetitle = external.menuArguments.document.title
Dim fso, half
Set fso = CreateObject("Scripting.FileSystemObject")
half = fso.GetFileName(external.menuArguments.location.href)
if InStr(half,".") then
s=InStr(half,".") -1
filename = Left(half, s)
filename = Replace(filename, "%20", "_")
Else filename = ""
End If
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
Set objWshSpecialFolders = WshShell.SpecialFolders
Mydocs2 = objWshSpecialFolders("MyDocuments")
if pagetitle > "" then
pagetitle = Replace(pagetitle, " ", "_")
pagetitle = Replace(pagetitle, "/", "_")
pagetitle = Replace(pagetitle, "\", "_")
pagetitle = Replace(pagetitle, ":", "_")
pagetitle = Replace(pagetitle, "|", "_")
pagetitle = Replace(pagetitle, "?", "_")
pagetitle = Replace(pagetitle, Chr(34), "_")
returntext = external.menuArguments.window.prompt ("Please provide the title" & vbCrLf & "(Empty Input or Cancel stop operation)",pagetitle)
Else returntext = external.menuArguments.window.prompt ("Please provide the title" & vbCrLf & "(Empty Input or Cancel stop operation)",filename)
End If
if returntext > "" then
Set oFSO = CreateObject("Scripting.FileSystemObject")
mht.GetAndSaveMHT myURL, Mydocs2 + returntext + ".mht"
do until oFSO.FileExists(Mydocs2 & returntext & ".mht")
loop
WshShell.Popup "Mission Accomplished!"
Set oFSO = Nothing
set mht = nothing
end if
</SCRIPT>


---------------------------------------------
My System SpecsSystem Spec
.


Reply

 How can i make IE9 save web pages in a default format




Thread Tools





Similar help and support threads
Thread Forum
What is the quickest way to save links to web pages
When I want to save a link to a web page, I open a 'word document' and use the 'copy' and 'paste' or Ctrl+C and Ctrl+V method to save it. I save hundreds of links this way. Is there a better way, a more efficient and faster method of doing this? Thank you
General Discussion
I need help to save web pages to my computer - Windows 7
I have been saving important web pages to my computer. When I open one, it opens as a 'user document'. What I would like to accomplish is, when I click on the document in it's saved locaion, for it to open the web page instead of opening as just a document. I have tried all the 'save as' options in...
Browsers & Mail
how do i make mc7 default audio output separate from system default
I have searched the internet for a solution but am not able to find one. My issue is that i would like to be able to have media center audio play only through my tv and not through my pc main speaker system, tv is hooked through hdmi output on graphics card, speaker system through 5.1 output on...
Media Center
Outlook 2010 setting default save format
I found "Outlook 2010 setting default save location" and that worked very well! I am looking for "Outlook 2010 setting default save format" so that when I save a mail, it does not default to .msg but rather to HTML. Thanks!
Microsoft Office
How can I make IE 9 save pages by default as html files? I hate mht
Hi, I am aware of this thread but didn't find it helpful: http://www.sevenforums.com/browsers-mail/155717-how-can-i-make-ie9-save-web-pages-default-format.html So, anyways, is there a registry hack anyone has made for IE 9 that can force IE 9 to stop choosing mht as the default format? I am...
Browsers & Mail
Setting default save location to last save folder
Is there any way to set the default save location folder for downloads in IE8 to the last folder that the same file type was saved in? It makes no sense to default to a single folder and have to browse through to the desired folder for every single download, so I assume there has to be an option...
General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 04:47.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App