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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bulk Conversion of WordPerfect Documents to MS Word

Status
Not open for further replies.

scooterDIVISION

Programmer
Feb 2, 2001
11
US
I want to bulk convert about 10000 WordPerfect files to MS Word, through a macro.

I was able to record a macro that would open and save selected files, but I need to point at a directory and process everything in the directory.

original code follows

::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::
Documents.Open FileName:="""Asbestos Memo.wpd""", ConfirmConversions:= _
False, ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto

ActiveDocument.SaveAs FileName:="Asbestos Memo.doc", FileFormat:= _
wdFormatDocument, LockComments:=False, Password:="", AddToRecentFiles:= _
True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:= _
False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
SaveAsAOCELetter:=False
ActiveWindow.Close
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::

This repeats for each selected document. What I need to do is either hard code the directory or allow the user to select the directory and process all (*.wpd) the WordPerefct Documents.

Thanks

Scott Stewart
RealMagnet.net

 
Take a look at the Dir function or at the FileSearch object.
You may also consider the Application.FileDialog(msoFileDialogFilePicker) method to select the directory.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top