It can be scripted within Word using Word's own macro language (Visual Basic For Applications).
Here's a very quick script I threw together to do just that, built from a couple of prerecorded macros and a few hints from web searches. It finds anything matching *.doc in the target directory (here, C:\, but you could change it to whatever you wanted by adjusting the path variable), and saves them as the same thing with an extra ".txt". If you edit this text into the macros of a dummy document or template, and select the run option for the SaveAllDocsAsUtf8 macro, it will generate the files you need.
(begin bit to copy into the macro file)
Sub SaveAllDocsAsUtf8() Dim path As String Dim file As String Dim newfile As String
path = "C:\" file = Dir(path & "*.doc")
Do While file <> "" newfile = path & file & ".txt" 'MsgBox newfile Documents.Open FileName:=path & file, ConfirmConversions:= _
False, ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto, XMLTransform:=""
ActiveDocument.SaveAs FileName:=newfile, FileFormat:= _
wdFormatText, LockComments:=False, Password:="", AddToRecentFiles:=True, _
WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
False, Encoding:=65001, InsertLineBreaks:=False, AllowSubstitutions:= _
False, LineEnding:=wdCRLF
ActiveDocument.Close
file = Dir Loop
End Sub
由兰卡斯特大学的Andrew Hardie提供。
Here's a very quick script I threw together to do just that, built from a couple of prerecorded macros and a few hints from web searches. It finds anything matching *.doc in the target directory (here, C:\, but you could change it to whatever you wanted by adjusting the path variable), and saves them as the same thing with an extra ".txt". If you edit this text into the macros of a dummy document or template, and select the run option for the SaveAllDocsAsUtf8 macro, it will generate the files you need.
(begin bit to copy into the macro file)
Sub SaveAllDocsAsUtf8() Dim path As String Dim file As String Dim newfile As String
path = "C:\" file = Dir(path & "*.doc")
Do While file <> "" newfile = path & file & ".txt" 'MsgBox newfile Documents.Open FileName:=path & file, ConfirmConversions:= _
False, ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto, XMLTransform:=""
ActiveDocument.SaveAs FileName:=newfile, FileFormat:= _
wdFormatText, LockComments:=False, Password:="", AddToRecentFiles:=True, _
WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
False, Encoding:=65001, InsertLineBreaks:=False, AllowSubstitutions:= _
False, LineEnding:=wdCRLF
ActiveDocument.Close
file = Dir Loop
End Sub
由兰卡斯特大学的Andrew Hardie提供。