Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Use command prompt to convert a batch of WP files to MSWord  (Read 4086 times)

0 Members and 1 Guest are viewing this topic.

kaypat

    Topic Starter


    Newbie

    • Experience: Beginner
    • OS: Windows XP
    Use command prompt to convert a batch of WP files to MSWord
    « on: January 10, 2013, 08:49:29 PM »
    My goal is to try and convert a large number of files in WORD PERFECT X5 to MSWord files.

    I would like have either a macro that will do this that i can RUN IN WORD PERFECT (I NEED it to run in WP)
    OR
    I would prefer to have a command prompt that can be set up so i can start a recursive batch system that will do the word perfect conversion to word for me...

    My files will be on my C:/ and the converted ones will also stay in the same place...Can anyone help me with this???

    I have a MSWord 2010 macro thatd can run in a new module in a word file that does this perfectly, my problem is that i NEED it to run in Word perfect, i have attached that macro to see if anyone can manipulate it for me to work in perfect!
    Or as i said help me with a command prompt.


    Sub ConvertWPtoDoc()
    '
    ' ConvertWPtoDoc Macro
    '
       Dim zSourceDir  As String
       Dim zDestDir    As String
       Dim zFileToCvt  As String
       Dim vFileName   As Variant
     
       '*** You need to provide info in each of the following 3 lines!!!
       zSourceDir = "T:\WordPerfect_Files"  'Path to the WordPerfect files
       zDestDir = "T:\Word Files"      'Path where convertd files are stored
       zFileToCvt = Dir(zSourceDir & "\*.wpd")      'Get 1st Filename
     
       Do While zFileToCvt <> ""
     
          Documents.Open _
            FileName:=Chr(34) & zSourceDir & "\" & zFileToCvt & Chr(34), _
            ConfirmConversions:=False, ReadOnly:=True
           
          vFileName = Split(zFileToCvt)  'Strip file type
       
          ActiveDocument.SaveAs2 _
            FileName:=Chr(34) & zDestDir & "\" & vFileName(0) & ".doc" & Chr(34), _
            FileFormat:=wdFormatDocument, SaveNativePictureFormat:=True
           
          ActiveDocument.Close SaveChanges:=False
         
          zFileToCvt = Dir() 'Get Next Filename
       
        Loop
       
    End Sub


    foxidrive



      Specialist
    • Thanked: 268
    • Experience: Experienced
    • OS: Windows 8
    Re: Use command prompt to convert a batch of WP files to MSWord
    « Reply #1 on: January 10, 2013, 09:19:42 PM »
    From Corel WordPerfect Office X5 Reviewer's Guide PDF file:

    Quote
    WordPerfect® Office Conversion Utility:
    The WordPerfect® Office Conversion Utility
    makes it easy to convert batches of any
    document type that WordPerfect X5 can
    open. For example, users can convert an
    entire folder structure of Microsoft Word
    documents to WordPerfect.