How do i convert .rtf Into .doc

Posted on 2007-08-11
Medium Priority
Last Modified: 2013-11-05
Hi i need to convert some .rtf files to .doc is there a free way to do if not whats my options i'm using word 2003
Question by:eric55
LVL 58

Accepted Solution

harfang earned 2000 total points
ID: 19678045
You can open the *.rtf, and use (File | Save As...) to save as *.doc.

LVL 15

Expert Comment

ID: 19678066
You can just rename the files (a.rtf -> a.doc). Why?

Author Comment

ID: 19678114
what i tried so far is in properties i changed the open with from word pad to word and it didnt work i'll try changing the extention i;ll let you know thanks
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

LVL 19

Expert Comment

ID: 19678115
file  - save as - word document .doc

or programatically
found here

save this as a vbs file

'' Start of Script
Option Explicit
On Error Resume Next
Dim Response
Dim anRTForDOCisOpen_Flag
dim nominatedFolder
dim fso
dim oApp
set oApp = createobject("Word.Application")
Set fso = CreateObject("Scripting.FileSystemObject")

nominatedFolder =fso.GetAbsolutePathName ("convertRTF2DOC.vbs")

nominatedFolder = Left(nominatedFolder, _
Response = MsgBox("Instruction:" & vbCrLf & _
"Place a copy of this program in any folder that" & _
" contains .rtf files that you want to convert to .doc files." _
& vbCrLf & _
"Please CLOSE all .rtf files to be converted to .doc files." _
& " And CLOSE all related .doc file with similar name as the .rtf. " _
& vbCrLf & "Double click on the program to start it and get this" & _
"initial window message prompt." & vbCrLf & vbCrLf & _
"Note:"&vbCrLf & _
"This program will completely replace the RTF files with DOC files." _
& vbCrLf & vbCrLf & "This program's current folder is " _
& nominatedFolder _
& vbCrLf & vbCrLf & vbCrLf & _
"Press OK button to continue with the conversion.", vbOKCancel, _
"RTF to DOC")

If Response <> 2 Then

ShowFolderList(nominatedFolder) ' call procedure

End if
set oApp = nothing
Set fso = nothing
Set nominatedFolder = nothing
' End of Script

'**************sub procedure*******************
'this sub procedure is copied from Peter Jamieson post
'Thanks for inspiring me to expand your original script
sub convertRTFtoDOC(pathWithRTFfilename)
dim newpathFilename 'as string
dim oDoc 'as object

newpathFilename = pathWithRTFfilename
' the ,0 parameter means do not confirm conversions
set oDoc = oApp.Documents.Open(newpathFilename,0)
'remove .rtf and replace with .doc as the new filename
newpathFilename = Left(newpathFilename, _
Len(newpathFilename) - 4) & ".doc"
' the 0 parameter means use .doc format
oDoc.SaveAs newpathFilename, 0
oDoc.close ' Important to close the .doc file

End sub

'************sub procedure********************
Sub ShowFolderList(folderspec)
Dim fs, f, f1, fc, s, i
i = 0
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(folderspec)
Set fc = f.Files
'loop & capture RTF & send to another sub for conversion to DOC
For Each f1 in fc

verifyIfRTForDOCopen (f1.name)
if (anRTForDOCisOpen_Flag = true) then
exit sub
end if

if (f1.type = "Rich Text Format") then

convertRTFtoDOC f1

s = s & f1.name
s = s & vbCrLf 'visualbasicCarriageLineFeed
f1.Delete True ' True force delete of read only file
i = i + 1 'count how many .rtf files

end if

' release memory use by object - not needed anymore.
Set fs = nothing
Set f = nothing
Set fc = nothing

If s = "" then
MsgBox "No .rtf file have been found in the folder " & folderspec & _
vbCrLf & vbCrLf & "Press OK button to EXIT."
MsgBox s & vbCrLf & i & " .rtf file converted to .doc file."
end if
Set nominatedFolder = nothing
End Sub

'*********************sub procedure***********************
sub verifyIfRTForDOCopen (f1dotname)

Dim colTasks , objTask, strName1,strName2
Set colTasks = oApp.Tasks
anRTForDOCisOpen_Flag = false

For Each objTask in colTasks

strName1 = Lcase(objTask.Name)
strName2 = Lcase(Left(f1dotname,Len(f1dotname) - 4))

If (Instr(strName1,strName2) >= 1) Then
MsgBox f1dotname & " is left open. Please close this file. " _
& vbCrLf & vbCrLf & _
"This program is halted!!! " & _
"Close all RTF and related DOC file before restarting program."_
, 0,"You have forgotten to close a file!!!"

anRTForDOCisOpen_Flag = true

exit sub
End If
End sub

Expert Comment

ID: 19866738
Hello ric55,
Just open the file in MS-Word and then save the file with other name as .doc.
I think this is pretty simple one.

And if you have more files then you have to rename the files using batch rename software to one go.
Hope this helps,

Expert Comment

ID: 20331599
Forced accept.

EE Admin

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As freelancing is becoming more and more common in the tech industry, certain obstacles are proving to be a challenge to those who are used to more traditional, structured employment. This article is meant to help identify such obstacles and offer a…
When asking a question in a forum or creating documentation, screenshots are vital tools that can convey a lot more information and save you and your reader a lot of time
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question