Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert 100's of Wordperfect files to Word 1

Status
Not open for further replies.

IFRs

Programmer
Mar 28, 2003
327
US
My office has zillions of DOC files that are not Word files but can be opened in Word. What is the best way to convert them to Word? They could be opened and "SaveAs" Word but that would take weeks. Would it be possible to write a macro or VBA that opened each file in a folder (or even better, the whole drive) and then did SaveAs? Is there a better way? I only have to do this once and the files are all on one server (but multiple folders). Many thanks!!
 


hi,

Since this you need a prorammable solution, please post in VBA Visual Basic for Applications (Microsoft) Forum707.

BTW, have you used your macro recorder to gen code for opening a Word Perfect file?

Skip,

[glasses] [red]Be Advised![/red] A man who jumps from a bridge in Paris, is…
INSANE! [tongue]
 
Special code is not required to open WP files - just "open" seems to work. However, the answer to your question is no, I have not started to program yet.
 


?????
Special code is not required to open WP files - just "open" seems to work
As I stated, yer in the wrong forum, bud! So my advise is either proceed as you just stated, or do as I formerly suggested WITH YOUR RECORDED CODE.

Skip,

[glasses] [red]Be Advised![/red] A man who jumps from a bridge in Paris, is…
INSANE! [tongue]
 
The VBA forum yielded gold. I tried this and it worked at home, just have to try it at work. Thanks for the good redirection, Skip.

Sub Macro1()

strDoc = Dir("*.doc")
While strDoc <> ""
Documents.Open FileName:=strDoc, Format:=wdOpenFormatAuto
ActiveDocument.SaveAs FileName:=strDoc, FileFormat:=wdFormatDocument
ActiveDocument.Close
strDoc = Dir
Wend

End Sub
 
dont be too happy yet.

Depending on the number of files you have you may not be able do do it that easily.

I have helped someone else with the exact program, and Word would crash after a few dozen documents.

Even using WP to do the conversion seemed to yield the same crash situation, and in both cases, doing all the standard "open/close/set to nothing" of the objects used did not make any difference.

In this case I used VBA and VB programs with the exact same result. Source program or executable can be supplied if anyone wishes.

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Word includes a batch conversion macro in the bundled macros template.


Regards: tf1
 
ft1 - where is the bundled macro template?
 
Frederico - you have VB and VBA programs that convert without crashing? If so I would like to try them.
 
No.
they still crash.
but instead of crashing every 10/20 files it takes longer to do it.

Note that the batch suplied with Word also crashes. no differences there, as the code is similar to the one you were givin and also to the one I have.


But do send me an email at

frederico_fonseca at the obivous domain below and I will send you the program.

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Hello All,
To furhter expand on tf1 comment about "batch conversion macro".

In Word: File select New then on the Other Documents tab select "Batch Conversion Wizard".

Follow the wizard. You can convert all files in one folder and send them to another folder.

I would suggest creating a backup copy of the files before the conversion, just in case the thing blows up. If the conversion works properly then the backup could be deleted.

Hope this helps.
Michael

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top