Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Mon, 23 Jun 2008 11:37:26 -0500,    group: microsoft.public.word.conversions        back       


Batch convert Works using Word 2007   
I've asked experts and looked all over the web.  I want to convert a 
batch of  Works wps files to Word 97-2003 files.  I repaired a computer that 
had been using Works and they lost the CD to install Works and now have a 
program that will read Word but not Works.

I can do it one at a time but not 100 at once.
date: Mon, 23 Jun 2008 11:37:26 -0500   author:   Jay

Re: Batch convert Works using Word 2007   
If you have the wps converter installed, as appears to be the case, the 
following macro will convert all the WPS format files in a selected folder 
to Word 97-2003 format.


Sub Batch_Save_WPS_as_DOC97()
Dim bConv As Boolean
Dim strFileName As String
Dim strDocName As String
Dim strPath As String
Dim oDoc As Document
Dim Response As Long
Dim fDialog As FileDialog

bConv = Options.ConfirmConversions
Options.ConfirmConversions = False
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
With fDialog
    .Title = "Select folder and click OK"
    .AllowMultiSelect = False
    .InitialView = msoFileDialogViewList
    If .Show <> -1 Then
        MsgBox "Cancelled By User", , "Save all as DOC"
        Exit Sub
    End If
    strPath = fDialog.SelectedItems.Item(1)
    If Right(strPath, 1) <> "\" Then strPath = strPath + "\"
End With

If Documents.Count > 0 Then
    Documents.Close SaveChanges:=wdPromptToSaveChanges
End If

strFileName = Dir$(strPath & "*.wps")

While Len(strFileName) <> 0
Set oDoc = Documents.Open(strPath & strFileName)

    strDocName = ActiveDocument.FullName
    intPos = InStrRev(strDocName, ".")
    strDocName = Left(strDocName, intPos - 1)
    strDocName = strDocName & ".doc"
    oDoc.SaveAs FileName:=strDocName, _
            FileFormat:=wdFormatDocument97
    oDoc.Close SaveChanges:=wdDoNotSaveChanges
    strFileName = Dir$()
Wend
Options.ConfirmConversions = bConv
End Sub

http://www.gmayor.com/installing_macro.htm

-- 
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Jay wrote:
>    I've asked experts and looked all over the web.  I want to convert
> a batch of  Works wps files to Word 97-2003 files.  I repaired a
> computer that had been using Works and they lost the CD to install
> Works and now have a program that will read Word but not Works.
>
> I can do it one at a time but not 100 at once.
date: Tue, 24 Jun 2008 07:33:06 +0300   author:   Graham Mayor

Re: Batch convert Works using Word 2007   
Thanks for the macro - it worked great!

"Graham Mayor" wrote:

> If you have the wps converter installed, as appears to be the case, the 
> following macro will convert all the WPS format files in a selected folder 
> to Word 97-2003 format.
> 
> 
> Sub Batch_Save_WPS_as_DOC97()
> Dim bConv As Boolean
> Dim strFileName As String
> Dim strDocName As String
> Dim strPath As String
> Dim oDoc As Document
> Dim Response As Long
> Dim fDialog As FileDialog
> 
> bConv = Options.ConfirmConversions
> Options.ConfirmConversions = False
> Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
> With fDialog
>     .Title = "Select folder and click OK"
>     .AllowMultiSelect = False
>     .InitialView = msoFileDialogViewList
>     If .Show <> -1 Then
>         MsgBox "Cancelled By User", , "Save all as DOC"
>         Exit Sub
>     End If
>     strPath = fDialog.SelectedItems.Item(1)
>     If Right(strPath, 1) <> "\" Then strPath = strPath + "\"
> End With
> 
> If Documents.Count > 0 Then
>     Documents.Close SaveChanges:=wdPromptToSaveChanges
> End If
> 
> strFileName = Dir$(strPath & "*.wps")
> 
> While Len(strFileName) <> 0
> Set oDoc = Documents.Open(strPath & strFileName)
> 
>     strDocName = ActiveDocument.FullName
>     intPos = InStrRev(strDocName, ".")
>     strDocName = Left(strDocName, intPos - 1)
>     strDocName = strDocName & ".doc"
>     oDoc.SaveAs FileName:=strDocName, _
>             FileFormat:=wdFormatDocument97
>     oDoc.Close SaveChanges:=wdDoNotSaveChanges
>     strFileName = Dir$()
> Wend
> Options.ConfirmConversions = bConv
> End Sub
> 
> http://www.gmayor.com/installing_macro.htm
> 
> -- 
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor -  Word MVP
> 
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> 
> 
> Jay wrote:
> >    I've asked experts and looked all over the web.  I want to convert
> > a batch of  Works wps files to Word 97-2003 files.  I repaired a
> > computer that had been using Works and they lost the CD to install
> > Works and now have a program that will read Word but not Works.
> >
> > I can do it one at a time but not 100 at once. 
> 
> 
>
date: Tue, 23 Sep 2008 10:55:02 -0700   author:   Braveheart

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us