Need to convert many old .wpd files to .rtf or .doc

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
A coworker of mine recently got a replacement for her old Windows 3.1 machine (!!) and has about 25 to 30 floppy disks worth of .wpd documents (circa version 4.2) that will eventally want to become .docs. In the meantime, .rtf's would be fabulous. Now, neither of us want to sit there and open each file individually and then resave it as an .rtf. Is there a converter somewhere (in WP, Office, or the Web) that could do this quickly from a command line? Between all the old 'puters at work, we have every version of Office, and most early versions of WordPerfect. I could also take the files home to my Linux box if there's a *nix utility out there.
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
Try to build a Macro that will duplicate the Save As command then terminate.
Once that works run a batch file that will start up Wrod with the file and execute the macro against each old file.
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Yeah, that would make sense. It's been ages since I made an Office macro, so I was kinda hoping there was a command-line utility. Well, it'll be a useful refresher. Thanks.
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
FWIW,

Found a loop macro online and adapted it for my purposes... it takes all the .rtf files from one folder and converts them to .docs in another. This was just a test, since I don't have the .wpd's on hand right now. I think it should work apart maybe from adding some options to the Open statement to account for the .wpd conversion. Also, it saves file.rtf as file.rtf.doc, but I can fix that more easily at the command line than figuring out how to get VB to do it.

Sub rtf2docbatch()

Dim myFile As String
Dim myDoc As Document

On Error Resume Next

myFile = Dir$("D:\rtfs\" & "*.rtf")

While myFile <> ""

Set myDoc = Documents.Open("D:\rtfs\" & myFile)

ChangeFileOpenDirectory "D:\docs\"
ActiveDocument.SaveAs FileName:=myFile & ".doc", FileFormat:=wdFormatDocument
ActiveDocument.Close

myFile = Dir$()

Wend

End Sub