Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    New Lounger
    Join Date
    Dec 2012
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Convert Word Perfect documents to Microsoft 2010 documents

    Hi,

    I have a number of word perfect documents that i need to convert into word documents. I have over a hundred that i needed to get done in a batch, or without clicking each individual file. Is there a macro that exists or that can be created to do this? I am not a coder, nor do i understand much about coding or VB, so any help or solution would be of great help!!!!!!!!!!!!

  2. Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    6,158
    Thanks
    200
    Thanked 781 Times in 715 Posts
    Kay,

    Yes it is doable but some caveats apply.
    1. Does your version of Word have the proper filter, e.g. can you open a WP file in Word and the conversion is done automatically?
    2. Are all the files in the same directory?

    If the answer to both of these questions is Yes then it is a fairly easy piece of code to write. If not then things would be a bit more difficult.
    May the Forces of good computing be with you!

    RG

    VBA Rules!

    My Systems: Desktop Specs
    Laptop Specs


  4. #3
    New Lounger
    Join Date
    Dec 2012
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts
    YESSS, YESS YESS, The answer to all those questions is yes!!! If it is that simple please help me. That is great news!!! I have been trying to figure this out forever, with no luck! Thank-you for shedding light!

  5. #4
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    6,158
    Thanks
    200
    Thanked 781 Times in 715 Posts
    KayPat,

    What version of Word are you using? 2010, 2007, 2003, etc.?
    What version of Word Perfect were they created with?
    What directory are the Word Perfect files located in? And what extension are they using?
    What directory do you want the converted files to be saved in?
    May the Forces of good computing be with you!

    RG

    VBA Rules!

    My Systems: Desktop Specs
    Laptop Specs


  6. #5
    New Lounger
    Join Date
    Dec 2012
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts
    1. I am using word 2010
    2. files are located on my desktop in a folder and on my c:/ (I can move them all to one place if necessary)
    3. The converted files can be saved in the same place.

  7. #6
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    6,158
    Thanks
    200
    Thanked 781 Times in 715 Posts
    KayPat,

    Could you post a small WordPerfect file I can use as a test?
    What version of WordPerfect are you using?
    Yes, it would be good if all the documents were in a special folder and you also setup a special folder to receive the converted files that way your originals will not be destroyed.

    I have the code written I only need to test it with a WordPerfect File.
    May the Forces of good computing be with you!

    RG

    VBA Rules!

    My Systems: Desktop Specs
    Laptop Specs


  8. #7
    New Lounger
    Join Date
    Dec 2012
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts
    I am using wordperfect 5x, and I will create a file on my c:/ to store the word perfect files as well as a seperate folder for the word files.

  9. #8
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    6,158
    Thanks
    200
    Thanked 781 Times in 715 Posts
    KayPat,

    Ok, here's the code:
    Code:
    Option Explicit
    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 = "d:\pathwhere\WP Files reside"  'Path to the WordPerfect files
       zDestDir = "d:\pathwhere\Word Files Go"      'Path where convertd files are stored
       zFileToCvt = Dir(zSourceDir & "\*.wps")      '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) & zSourceDir & "\" & vFileName(0) & ".doc" & Chr(34), _
            FileFormat:=wdFormatDocument
            
          ActiveDocument.Close SaveChanges:=False
          
          zFileToCvt = Dir() 'Get Next Filename
        
        Loop
        
    End Sub
    I haven't fully tested this because you didn't attach a file in WP format but it should work.
    You have to replace the path information in 2 lines and the file extension {.wps} with the correct WordPerfect file extension. in the third for it to work.
    The code needs to be placed in a Module in your Normal Project.
    NormalModule.JPG
    May the Forces of good computing be with you!

    RG

    VBA Rules!

    My Systems: Desktop Specs
    Laptop Specs


  10. #9
    New Lounger
    Join Date
    Dec 2012
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts
    THANK-YOU tremendously for your work! I will not have access until tomorrow, but i will be sure to test this out first thing and let you know how it goes! Do i place the code in the "first filename" that you specified, which would be the wordperfect file? and then run it, and then all the files will convert??

  11. #10
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    6,158
    Thanks
    200
    Thanked 781 Times in 715 Posts
    KayPat,

    To use the code do the following:
    1. Open a blank Microsoft Word Document.
    2. Press Ctrl+F11 - Opens the VBA Editor.
    3. Right-Click on the Normal Project as highlighted in my post above.
    4. Select Insert then Module.
    5. Copy the code from my post above into the Module code area {the right hand window}.
    6. Make the changes indicated.
    7. Press F5 to run the macro or you can return to the Document screen press Alt+F8 and select the macro from there.
    8. Sit back and let it run.

    May the Forces of good computing be with you!

    RG

    VBA Rules!

    My Systems: Desktop Specs
    Laptop Specs


  12. #11
    New Lounger
    Join Date
    Dec 2012
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Unhappy

    Here is what i did....
    The word perfect files are stored on my T:/ and i want the new ones to go there too (so i think i did that part right) The name of my first file is Test 1_Virtual Machine.wpd (so i put that in the third line). I place the code in a new word document and ran it, but it only converted that 'one' file...I have many more that i would like to convert at once (running the macro just once) Is that possible? This web page will not let me attach a WPD document for you to test! ...Thankyou for your help, it is very much appreciated!


    Option Explicit
    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:\WordPerfect_Files" 'Path where convertd files are stored
    zFileToCvt = Dir(zSourceDir & "\*Test 1_Virtual Machine.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) & zSourceDir & "\" & vFileName(0) & ".doc" & Chr(34), _
    FileFormat:=wdFormatDocument

    ActiveDocument.Close SaveChanges:=False

    zFileToCvt = Dir() 'Get Next Filename

    Loop

    End Sub

  13. #12
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    6,158
    Thanks
    200
    Thanked 781 Times in 715 Posts
    KayPat,

    I guess my comment confused you. It's just that the Dir() command fetches the 1st file of the type you specify you don't include the filename.
    Thus it should read: zFileToCvt = Dir(zSourceDir & "\*.wpd") 'Get 1st Filename


    Sorry for the confusion.
    May the Forces of good computing be with you!

    RG

    VBA Rules!

    My Systems: Desktop Specs
    Laptop Specs


  14. #13
    New Lounger
    Join Date
    Dec 2012
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Okay sorry, i made that error, so here is what i did! Its works in converting one file, but doesnt do the rest, i have pasted my code below, do you see something i dont???

    Option Explicit
    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:\WordPerfect_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) & zSourceDir & "\" & vFileName(0) & ".doc" & Chr(34), _
    FileFormat:=wdFormatDocument

    ActiveDocument.Close SaveChanges:=False

    zFileToCvt = Dir() 'Get Next Filename

    Loop

    End Sub

  15. #14
    New Lounger
    Join Date
    Dec 2012
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts
    I also changed the path to a folder on my desktop (C:\Documents and Settings\mm\Desktop\WordPerfect_Files) and it is just converting one file and putting it in the T:/
    Last edited by KayPat; 2013-01-09 at 11:54.

  16. #15
    New Lounger
    Join Date
    Dec 2012
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts
    OKAY Great, it worked...
    The error was that all my files had Test as the first word and so it was just converting one file, when i changed the names it worked just fine.
    In my second challenge i tried to save the converted file to a different location (to a folder on my desktop) although all the files converted, they went back to the folder where my original WordPerfect files were are and not in the new location i set the path too. What is the problem here, any suggestions???
    Lastly, all files contain a different image with different paths, how do i solve this issue whilst in the conversion process, as i noticed that it prompts if you wanted to set a path for conversion to complete!!!How can this be done with the macro?

    BTW, You help has been unbelievable!!!

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •