Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Paul Paul is offline
external usenet poster
 
Posts: 35
Default Saving mht files as .doc or .rtf

I have a large collection of .mht files that I have decided to convert to MS
Word (.doc) files (Desktop search engines have too much touble indexing
their contents). I will be opening them up in MS Word whenever I want to
read one, but I'm wondering if I can get Word at all to save this in a .doc
or even .rtf file format--without my going to the file-save as menu?



--
Paul
Office 2003
XP SP3
Dell Inspiron 1501



  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Saving mht files as .doc or .rtf

Not really, but you can automate the process. The following macro will open
and save all the mht files in a folder as Word DOC into the same folder
(re-writing any existing document of the same name in that folder without
prompting - so move them to a safe location before running the macro). The
macro also assumes that you have used a standard naming convention i.e.
without extra full stops (periods) .

http://www.gmayor.com/installing_macro.htm

Sub SaveMHTAsDoc()
Dim fName() As String
Dim strFile As String
Dim strPath As String
Dim strDoc As Document
Dim fDialog As FileDialog
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
With fDialog
.Title = "Select folder and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show -1 Then
MsgBox "Cancelled By User", , "List Folder Contents"
Exit Sub
End If
strPath = fDialog.SelectedItems.Item(1)
If Right(strPath, 1) "\" Then strPath = strPath + "\"
End With

If Documents.Count 0 Then
Documents.Close SaveChanges:=wdPromptToSaveChanges
End If
strFile = Dir$(strPath & "*.mht")
While strFile ""
Set strDoc = Documents.Open(strPath & strFile)
fName = Split(strDoc, ".")
ActiveWindow.View.Type = wdPrintView
With strDoc
.SaveAs FileName:=fName(0) & ".doc", _
FileFormat:=wdFormatDocument
.Close
End With
strFile = Dir$()
Wend
End Sub

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Paul wrote:
I have a large collection of .mht files that I have decided to
convert to MS Word (.doc) files (Desktop search engines have too much
touble indexing their contents). I will be opening them up in MS
Word whenever I want to read one, but I'm wondering if I can get Word
at all to save this in a .doc or even .rtf file format--without my
going to the file-save as menu?



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Paul Paul is offline
external usenet poster
 
Posts: 35
Default Saving mht files as .doc or .rtf

Graham, that was a big big help. OK if I don't get anything more that will
be a huge time saver. I have tons of files that I've saved over the years as
mht and this definitely makes it quicker, as I just can't expect these
desktop search engines to all index them.

I now have another question. WHen I used it in one folder (My
Documents/Economics) it saved them with a pretty good fidelity, but in the
My Documents directory. Is there any tweak I can make that would send them
right back into teh sub-directory they were originally in (as mht)?

--
Paul
Office 2003
XP SP3
Dell Inspiron 1501


"Graham Mayor" wrote in message
...
Not really, but you can automate the process. The following macro will
open and save all the mht files in a folder as Word DOC into the same
folder (re-writing any existing document of the same name in that folder
without prompting - so move them to a safe location before running the
macro). The macro also assumes that you have used a standard naming
convention i.e. without extra full stops (periods) .

http://www.gmayor.com/installing_macro.htm

Sub SaveMHTAsDoc()
Dim fName() As String
Dim strFile As String
Dim strPath As String
Dim strDoc As Document
Dim fDialog As FileDialog
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
With fDialog
.Title = "Select folder and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show -1 Then
MsgBox "Cancelled By User", , "List Folder Contents"
Exit Sub
End If
strPath = fDialog.SelectedItems.Item(1)
If Right(strPath, 1) "\" Then strPath = strPath + "\"
End With

If Documents.Count 0 Then
Documents.Close SaveChanges:=wdPromptToSaveChanges
End If
strFile = Dir$(strPath & "*.mht")
While strFile ""
Set strDoc = Documents.Open(strPath & strFile)
fName = Split(strDoc, ".")
ActiveWindow.View.Type = wdPrintView
With strDoc
.SaveAs FileName:=fName(0) & ".doc", _
FileFormat:=wdFormatDocument
.Close
End With
strFile = Dir$()
Wend
End Sub

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Paul wrote:
I have a large collection of .mht files that I have decided to
convert to MS Word (.doc) files (Desktop search engines have too much
touble indexing their contents). I will be opening them up in MS
Word whenever I want to read one, but I'm wondering if I can get Word
at all to save this in a .doc or even .rtf file format--without my
going to the file-save as menu?





  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Saving mht files as .doc or .rtf

It should already save the documents in the same folder, however the
following mod should ensure that it does:

Sub SaveMHTAsDoc()
Dim fName() As String
Dim sOpt As Boolean
Dim strFile As String
Dim strPath As String
Dim strDoc As Document
Dim fDialog As FileDialog
sOpt = Options.ConfirmConversions
Options.ConfirmConversions = False
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
With fDialog
.Title = "Select folder and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show -1 Then
MsgBox "Cancelled By User", , "List Folder Contents"
Exit Sub
End If
strPath = fDialog.SelectedItems.Item(1)
If Right(strPath, 1) "\" Then strPath = strPath + "\"
End With

If Documents.Count 0 Then
Documents.Close SaveChanges:=wdPromptToSaveChanges
End If
strFile = Dir$(strPath & "*.mht")
While strFile ""
Set strDoc = Documents.Open(strPath & strFile)
fName = Split(strFile, ".")
ActiveWindow.View.Type = wdPrintView
With strDoc
.SaveAs FileName:=strPath & fName(0) & ".doc", _
FileFormat:=wdFormatDocument
.Close
End With
strFile = Dir$()
Wend
Options.ConfirmConversions = sOpt
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Paul wrote:
Graham, that was a big big help. OK if I don't get anything more
that will be a huge time saver. I have tons of files that I've saved
over the years as mht and this definitely makes it quicker, as I just
can't expect these desktop search engines to all index them.

I now have another question. WHen I used it in one folder (My
Documents/Economics) it saved them with a pretty good fidelity, but
in the My Documents directory. Is there any tweak I can make that
would send them right back into teh sub-directory they were
originally in (as mht)?

"Graham Mayor" wrote in message
...
Not really, but you can automate the process. The following macro
will open and save all the mht files in a folder as Word DOC into
the same folder (re-writing any existing document of the same name
in that folder without prompting - so move them to a safe location
before running the macro). The macro also assumes that you have used
a standard naming convention i.e. without extra full stops (periods)
. http://www.gmayor.com/installing_macro.htm

Sub SaveMHTAsDoc()
Dim fName() As String
Dim strFile As String
Dim strPath As String
Dim strDoc As Document
Dim fDialog As FileDialog
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
With fDialog
.Title = "Select folder and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show -1 Then
MsgBox "Cancelled By User", , "List Folder Contents"
Exit Sub
End If
strPath = fDialog.SelectedItems.Item(1)
If Right(strPath, 1) "\" Then strPath = strPath + "\"
End With

If Documents.Count 0 Then
Documents.Close SaveChanges:=wdPromptToSaveChanges
End If
strFile = Dir$(strPath & "*.mht")
While strFile ""
Set strDoc = Documents.Open(strPath & strFile)
fName = Split(strDoc, ".")
ActiveWindow.View.Type = wdPrintView
With strDoc
.SaveAs FileName:=fName(0) & ".doc", _
FileFormat:=wdFormatDocument
.Close
End With
strFile = Dir$()
Wend
End Sub

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Paul wrote:
I have a large collection of .mht files that I have decided to
convert to MS Word (.doc) files (Desktop search engines have too
much touble indexing their contents). I will be opening them up in
MS Word whenever I want to read one, but I'm wondering if I can get
Word at all to save this in a .doc or even .rtf file
format--without my going to the file-save as menu?



  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Paul Paul is offline
external usenet poster
 
Posts: 35
Default Saving mht files as .doc or .rtf

Incredible Graham. THanks a lot.

I do have one more question. When Word is saving these files, 70% of teh
time I get, for each file, a popup window that says something like "Linked
style sheets are only supported in web format files. By saivng to this
format, all links to style sheets will be lost."

Is there any way I can disable this error notification?

--
Paul
Office 2003
XP SP3
Dell Inspiron 1501


"Graham Mayor" wrote in message
...
It should already save the documents in the same folder, however the
following mod should ensure that it does:

Sub SaveMHTAsDoc()
Dim fName() As String
Dim sOpt As Boolean
Dim strFile As String
Dim strPath As String
Dim strDoc As Document
Dim fDialog As FileDialog
sOpt = Options.ConfirmConversions
Options.ConfirmConversions = False
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
With fDialog
.Title = "Select folder and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show -1 Then
MsgBox "Cancelled By User", , "List Folder Contents"
Exit Sub
End If
strPath = fDialog.SelectedItems.Item(1)
If Right(strPath, 1) "\" Then strPath = strPath + "\"
End With

If Documents.Count 0 Then
Documents.Close SaveChanges:=wdPromptToSaveChanges
End If
strFile = Dir$(strPath & "*.mht")
While strFile ""
Set strDoc = Documents.Open(strPath & strFile)
fName = Split(strFile, ".")
ActiveWindow.View.Type = wdPrintView
With strDoc
.SaveAs FileName:=strPath & fName(0) & ".doc", _
FileFormat:=wdFormatDocument
.Close
End With
strFile = Dir$()
Wend
Options.ConfirmConversions = sOpt
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Paul wrote:
Graham, that was a big big help. OK if I don't get anything more
that will be a huge time saver. I have tons of files that I've saved
over the years as mht and this definitely makes it quicker, as I just
can't expect these desktop search engines to all index them.

I now have another question. WHen I used it in one folder (My
Documents/Economics) it saved them with a pretty good fidelity, but
in the My Documents directory. Is there any tweak I can make that
would send them right back into teh sub-directory they were
originally in (as mht)?

"Graham Mayor" wrote in message
...
Not really, but you can automate the process. The following macro
will open and save all the mht files in a folder as Word DOC into
the same folder (re-writing any existing document of the same name
in that folder without prompting - so move them to a safe location
before running the macro). The macro also assumes that you have used
a standard naming convention i.e. without extra full stops (periods)
. http://www.gmayor.com/installing_macro.htm

Sub SaveMHTAsDoc()
Dim fName() As String
Dim strFile As String
Dim strPath As String
Dim strDoc As Document
Dim fDialog As FileDialog
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
With fDialog
.Title = "Select folder and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show -1 Then
MsgBox "Cancelled By User", , "List Folder Contents"
Exit Sub
End If
strPath = fDialog.SelectedItems.Item(1)
If Right(strPath, 1) "\" Then strPath = strPath + "\"
End With

If Documents.Count 0 Then
Documents.Close SaveChanges:=wdPromptToSaveChanges
End If
strFile = Dir$(strPath & "*.mht")
While strFile ""
Set strDoc = Documents.Open(strPath & strFile)
fName = Split(strDoc, ".")
ActiveWindow.View.Type = wdPrintView
With strDoc
.SaveAs FileName:=fName(0) & ".doc", _
FileFormat:=wdFormatDocument
.Close
End With
strFile = Dir$()
Wend
End Sub

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Paul wrote:
I have a large collection of .mht files that I have decided to
convert to MS Word (.doc) files (Desktop search engines have too
much touble indexing their contents). I will be opening them up in
MS Word whenever I want to read one, but I'm wondering if I can get
Word at all to save this in a .doc or even .rtf file
format--without my going to the file-save as menu?







  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Saving mht files as .doc or .rtf

I suspect not - I don't know of one.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Paul wrote:
Incredible Graham. THanks a lot.

I do have one more question. When Word is saving these files, 70% of
teh time I get, for each file, a popup window that says something
like "Linked style sheets are only supported in web format files. By
saivng to this format, all links to style sheets will be lost."

Is there any way I can disable this error notification?


"Graham Mayor" wrote in message
...
It should already save the documents in the same folder, however the
following mod should ensure that it does:

Sub SaveMHTAsDoc()
Dim fName() As String
Dim sOpt As Boolean
Dim strFile As String
Dim strPath As String
Dim strDoc As Document
Dim fDialog As FileDialog
sOpt = Options.ConfirmConversions
Options.ConfirmConversions = False
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
With fDialog
.Title = "Select folder and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show -1 Then
MsgBox "Cancelled By User", , "List Folder Contents"
Exit Sub
End If
strPath = fDialog.SelectedItems.Item(1)
If Right(strPath, 1) "\" Then strPath = strPath + "\"
End With

If Documents.Count 0 Then
Documents.Close SaveChanges:=wdPromptToSaveChanges
End If
strFile = Dir$(strPath & "*.mht")
While strFile ""
Set strDoc = Documents.Open(strPath & strFile)
fName = Split(strFile, ".")
ActiveWindow.View.Type = wdPrintView
With strDoc
.SaveAs FileName:=strPath & fName(0) & ".doc", _
FileFormat:=wdFormatDocument
.Close
End With
strFile = Dir$()
Wend
Options.ConfirmConversions = sOpt
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Paul wrote:
Graham, that was a big big help. OK if I don't get anything more
that will be a huge time saver. I have tons of files that I've saved
over the years as mht and this definitely makes it quicker, as I
just can't expect these desktop search engines to all index them.

I now have another question. WHen I used it in one folder (My
Documents/Economics) it saved them with a pretty good fidelity, but
in the My Documents directory. Is there any tweak I can make that
would send them right back into teh sub-directory they were
originally in (as mht)?

"Graham Mayor" wrote in message
...
Not really, but you can automate the process. The following macro
will open and save all the mht files in a folder as Word DOC into
the same folder (re-writing any existing document of the same name
in that folder without prompting - so move them to a safe location
before running the macro). The macro also assumes that you have
used a standard naming convention i.e. without extra full stops
(periods) . http://www.gmayor.com/installing_macro.htm

Sub SaveMHTAsDoc()
Dim fName() As String
Dim strFile As String
Dim strPath As String
Dim strDoc As Document
Dim fDialog As FileDialog
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
With fDialog
.Title = "Select folder and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show -1 Then
MsgBox "Cancelled By User", , "List Folder Contents"
Exit Sub
End If
strPath = fDialog.SelectedItems.Item(1)
If Right(strPath, 1) "\" Then strPath = strPath + "\"
End With

If Documents.Count 0 Then
Documents.Close SaveChanges:=wdPromptToSaveChanges
End If
strFile = Dir$(strPath & "*.mht")
While strFile ""
Set strDoc = Documents.Open(strPath & strFile)
fName = Split(strDoc, ".")
ActiveWindow.View.Type = wdPrintView
With strDoc
.SaveAs FileName:=fName(0) & ".doc", _
FileFormat:=wdFormatDocument
.Close
End With
strFile = Dir$()
Wend
End Sub

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Paul wrote:
I have a large collection of .mht files that I have decided to
convert to MS Word (.doc) files (Desktop search engines have too
much touble indexing their contents). I will be opening them up
in MS Word whenever I want to read one, but I'm wondering if I
can get Word at all to save this in a .doc or even .rtf file
format--without my going to the file-save as menu?



  #7   Report Post  
Posted to microsoft.public.word.docmanagement
Paul Paul is offline
external usenet poster
 
Posts: 35
Default Saving mht files as .doc or .rtf

That's alright that would have been just the frosting on the cake--the
lion's share of teh work has already been saved by your macro. Thanks again.

--
Paul
Office 2003
XP SP3
Dell Inspiron 1501


"Graham Mayor" wrote in message
...
I suspect not - I don't know of one.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Paul wrote:
Incredible Graham. THanks a lot.

I do have one more question. When Word is saving these files, 70% of
teh time I get, for each file, a popup window that says something
like "Linked style sheets are only supported in web format files. By
saivng to this format, all links to style sheets will be lost."

Is there any way I can disable this error notification?


"Graham Mayor" wrote in message
...
It should already save the documents in the same folder, however the
following mod should ensure that it does:

Sub SaveMHTAsDoc()
Dim fName() As String
Dim sOpt As Boolean
Dim strFile As String
Dim strPath As String
Dim strDoc As Document
Dim fDialog As FileDialog
sOpt = Options.ConfirmConversions
Options.ConfirmConversions = False
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
With fDialog
.Title = "Select folder and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show -1 Then
MsgBox "Cancelled By User", , "List Folder Contents"
Exit Sub
End If
strPath = fDialog.SelectedItems.Item(1)
If Right(strPath, 1) "\" Then strPath = strPath + "\"
End With

If Documents.Count 0 Then
Documents.Close SaveChanges:=wdPromptToSaveChanges
End If
strFile = Dir$(strPath & "*.mht")
While strFile ""
Set strDoc = Documents.Open(strPath & strFile)
fName = Split(strFile, ".")
ActiveWindow.View.Type = wdPrintView
With strDoc
.SaveAs FileName:=strPath & fName(0) & ".doc", _
FileFormat:=wdFormatDocument
.Close
End With
strFile = Dir$()
Wend
Options.ConfirmConversions = sOpt
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Paul wrote:
Graham, that was a big big help. OK if I don't get anything more
that will be a huge time saver. I have tons of files that I've saved
over the years as mht and this definitely makes it quicker, as I
just can't expect these desktop search engines to all index them.

I now have another question. WHen I used it in one folder (My
Documents/Economics) it saved them with a pretty good fidelity, but
in the My Documents directory. Is there any tweak I can make that
would send them right back into teh sub-directory they were
originally in (as mht)?

"Graham Mayor" wrote in message
...
Not really, but you can automate the process. The following macro
will open and save all the mht files in a folder as Word DOC into
the same folder (re-writing any existing document of the same name
in that folder without prompting - so move them to a safe location
before running the macro). The macro also assumes that you have
used a standard naming convention i.e. without extra full stops
(periods) . http://www.gmayor.com/installing_macro.htm

Sub SaveMHTAsDoc()
Dim fName() As String
Dim strFile As String
Dim strPath As String
Dim strDoc As Document
Dim fDialog As FileDialog
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
With fDialog
.Title = "Select folder and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show -1 Then
MsgBox "Cancelled By User", , "List Folder Contents"
Exit Sub
End If
strPath = fDialog.SelectedItems.Item(1)
If Right(strPath, 1) "\" Then strPath = strPath + "\"
End With

If Documents.Count 0 Then
Documents.Close SaveChanges:=wdPromptToSaveChanges
End If
strFile = Dir$(strPath & "*.mht")
While strFile ""
Set strDoc = Documents.Open(strPath & strFile)
fName = Split(strDoc, ".")
ActiveWindow.View.Type = wdPrintView
With strDoc
.SaveAs FileName:=fName(0) & ".doc", _
FileFormat:=wdFormatDocument
.Close
End With
strFile = Dir$()
Wend
End Sub

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Paul wrote:
I have a large collection of .mht files that I have decided to
convert to MS Word (.doc) files (Desktop search engines have too
much touble indexing their contents). I will be opening them up
in MS Word whenever I want to read one, but I'm wondering if I
can get Word at all to save this in a .doc or even .rtf file
format--without my going to the file-save as menu?





  #8   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Saving mht files as .doc or .rtf

You are welcome

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Paul wrote:
That's alright that would have been just the frosting on the cake--the
lion's share of teh work has already been saved by your macro. Thanks
again.

"Graham Mayor" wrote in message
...
I suspect not - I don't know of one.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Paul wrote:
Incredible Graham. THanks a lot.

I do have one more question. When Word is saving these files, 70%
of teh time I get, for each file, a popup window that says something
like "Linked style sheets are only supported in web format files. By
saivng to this format, all links to style sheets will be lost."

Is there any way I can disable this error notification?


"Graham Mayor" wrote in message
...
It should already save the documents in the same folder, however
the following mod should ensure that it does:

Sub SaveMHTAsDoc()
Dim fName() As String
Dim sOpt As Boolean
Dim strFile As String
Dim strPath As String
Dim strDoc As Document
Dim fDialog As FileDialog
sOpt = Options.ConfirmConversions
Options.ConfirmConversions = False
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
With fDialog
.Title = "Select folder and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show -1 Then
MsgBox "Cancelled By User", , "List Folder Contents"
Exit Sub
End If
strPath = fDialog.SelectedItems.Item(1)
If Right(strPath, 1) "\" Then strPath = strPath + "\"
End With

If Documents.Count 0 Then
Documents.Close SaveChanges:=wdPromptToSaveChanges
End If
strFile = Dir$(strPath & "*.mht")
While strFile ""
Set strDoc = Documents.Open(strPath & strFile)
fName = Split(strFile, ".")
ActiveWindow.View.Type = wdPrintView
With strDoc
.SaveAs FileName:=strPath & fName(0) & ".doc", _
FileFormat:=wdFormatDocument
.Close
End With
strFile = Dir$()
Wend
Options.ConfirmConversions = sOpt
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Paul wrote:
Graham, that was a big big help. OK if I don't get anything more
that will be a huge time saver. I have tons of files that I've
saved over the years as mht and this definitely makes it quicker,
as I just can't expect these desktop search engines to all index
them. I now have another question. WHen I used it in one folder (My
Documents/Economics) it saved them with a pretty good fidelity,
but in the My Documents directory. Is there any tweak I can make
that would send them right back into teh sub-directory they were
originally in (as mht)?

"Graham Mayor" wrote in message
...
Not really, but you can automate the process. The following macro
will open and save all the mht files in a folder as Word DOC into
the same folder (re-writing any existing document of the same
name in that folder without prompting - so move them to a safe
location before running the macro). The macro also assumes that
you have used a standard naming convention i.e. without extra
full stops (periods) . http://www.gmayor.com/installing_macro.htm

Sub SaveMHTAsDoc()
Dim fName() As String
Dim strFile As String
Dim strPath As String
Dim strDoc As Document
Dim fDialog As FileDialog
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
With fDialog
.Title = "Select folder and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show -1 Then
MsgBox "Cancelled By User", , "List Folder Contents"
Exit Sub
End If
strPath = fDialog.SelectedItems.Item(1)
If Right(strPath, 1) "\" Then strPath = strPath + "\"
End With

If Documents.Count 0 Then
Documents.Close SaveChanges:=wdPromptToSaveChanges
End If
strFile = Dir$(strPath & "*.mht")
While strFile ""
Set strDoc = Documents.Open(strPath & strFile)
fName = Split(strDoc, ".")
ActiveWindow.View.Type = wdPrintView
With strDoc
.SaveAs FileName:=fName(0) & ".doc", _
FileFormat:=wdFormatDocument
.Close
End With
strFile = Dir$()
Wend
End Sub

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Paul wrote:
I have a large collection of .mht files that I have decided to
convert to MS Word (.doc) files (Desktop search engines have too
much touble indexing their contents). I will be opening them up
in MS Word whenever I want to read one, but I'm wondering if I
can get Word at all to save this in a .doc or even .rtf file
format--without my going to the file-save as menu?



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
saving files Kenny Microsoft Word Help 1 August 18th 08 08:33 AM
Saving Files Howard New Users 1 September 19th 05 01:27 AM
Saving files Penny Becker Microsoft Word Help 3 February 1st 05 06:40 PM
Saving Files Rahul Thakrar Microsoft Word Help 1 December 24th 04 03:06 AM
When saving, seeing all files ll Microsoft Word Help 1 December 3rd 04 07:21 PM


All times are GMT +1. The time now is 12:16 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"