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

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

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

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




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 08:57 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33