• VB Script Needed for WordPerfect X4 Conversion to Word 2013 – AVERY LABELS.

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » VB Script Needed for WordPerfect X4 Conversion to Word 2013 – AVERY LABELS.

    Author
    Topic
    #1773652

    Good day!

    Re: /showthread//151435-Convert-Word-Perfect-documents-to-Microsoft-2010-documents

    Newbie here…

    Thanks to RetiredGeek, et al, I’ve been somewhat successful in converting WordPerfect X4 (*.wpd) files to Word 2013 via VB batch. My need is to convert 200+ WP files that are saved as Avery labels. Is there a command line (or 2 or 16) that can be added to the script I’ve pasted below to specify a specific label size to insert first (with borders shown-but not printed)? I tried running the script within Word with the above label specifications pre-formatted but it didn’t work. I use Avery label no. 5263. These only have the first label filled with text, not an entire sheet.

    As a bonus … I’d also like the font set to Century Schoolbook size 13, single spaced.

    Thanks in advance for any help!!

    {Original Author: RetiredGeek}

    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 = “e:MP to MSWord”  ‘Path to the WordPerfect files
       zDestDir = ” e:”  ‘Path where convertd files are stored
       zFileToCvt = Dir(“e:MP to MSWord*.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
    Reply To: VB Script Needed for WordPerfect X4 Conversion to Word 2013 – AVERY LABELS.

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: