Why do you want to do this? It raises a couple of issues that you may not
have considered.
If you set the default to RTF then you should note that RTF format is not
fully compatible with Word document format and some elements of the document
may be lost. This is of particular note when batch processing.
The file sized produced by saving as RTF can be enormous eg while testing a
document file of 12,342 kb jumped in size to 464,031kb! Thus a batch process
to convert a folder full of files may take a long time and exhaust available
disc space.
You can set the save format from tools > options > save - if you must.
You can convert all the files in a folder using the following macro, which
will also backup the original file. The macro takes no account of documents
which may be password protected nor of documents which may be merge
documents- either of which will bring the process to an unceremonious halt.
http://www.gmayor.com/installing_macro.htm :
Sub SaveAllAsRTF()
Dim strFileName As String
Dim strDocName As String
Dim strPath As String
Dim oDoc As Document
Dim Response As Long
Dim fDialog As FileDialog
Dim sBackup As Boolean
sBackup = Options.CreateBackup
Options.CreateBackup = True
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", , "Save all as RTF"
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
strFileName = Dir$(strPath & "*.doc")
While Len(strFileName) <> 0
Set oDoc = Documents.Open(strPath & strFileName)
strDocName = ActiveDocument.FullName
If ActiveDocument.SaveFormat = wdFormatDocument Then
ActiveDocument.SaveAs FileFormat:=wdFormatRTF
End If
oDoc.Close SaveChanges:=wdDoNotSaveChanges
strFileName = Dir$()
Wend
Options.CreateBackup = sBackup
End Sub
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>