• VB Batch Code needed for conversion of WordPerfectX4 to Word 2013 – Avery Labels

    Home » Forums » Developers, developers, developers » DevOps Lounge » VB Batch Code needed for conversion of WordPerfectX4 to Word 2013 – Avery Labels

    Author
    Topic
    #1773653

    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 with the above open and pre-formatted but it didn’t work. I use Avery label no. 5263. These only have one label filled with text, not an entire sheet.

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

    Thanks in advance for any help!!

    {Original Author: RetiredGeek}

    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 Batch Code needed for conversion of WordPerfectX4 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: