Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-23-2014, 02:12 AM
macropod's Avatar
macropod macropod is offline word 2003 to word 2010 conversion. Windows 7 32bit word 2003 to word 2010 conversion. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default


You can convert a whole folder of documents with a simple macro:
Code:
Sub ConvertFiles()
Application.ScreenUpdating = False
Dim strFolder As String, strFile As String, wdDoc As Document
strFolder = GetFolder
If strFolder = "" Then Exit Sub
strFile = Dir(strFolder & "\*.doc", vbNormal)
While strFile <> ""
  If InStrRev(strFile, ".docx") = 0 Then
    Set wdDoc = Documents.Open(FileName:=strFolder & "\" & strFile, _
      AddToRecentFiles:=False, Visible:=False)
    wdDoc.SaveAs2 FileName:=strFolder & "\" & Left(strFile, InStrRev(strFile, ".doc")) & "docx", _
      Fileformat:=wdFormatXMLDocument, AddToRecentFiles:=False
    wdDoc.Close SaveChanges:=False
  End If
  strFile = Dir()
Wend
Set wdDoc = Nothing
Application.ScreenUpdating = True
End Sub
 
Function GetFolder() As String
Dim oFolder As Object
GetFolder = ""
Set oFolder = CreateObject("Shell.Application").BrowseForFolder(0, "Choose a folder", 0)
If (Not oFolder Is Nothing) Then GetFolder = oFolder.Items.Item.Path
Set oFolder = Nothing
End Function
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
word 2003 to word 2010 conversion. MS Word 2010 Content Controls and PDF Conversion. MaxInCO Word 3 02-13-2014 12:58 PM
word 2003 to word 2010 conversion. Word 2003 Macro problem running in Word 2010 norwood Word VBA 2 02-03-2014 06:49 PM
word 2003 to word 2010 conversion. Graphics Created in Word 2003 Cannot Be Displayed in Word 2010 mwildem Drawing and Graphics 3 02-14-2013 10:59 AM
Are user customizations transferable from Word 2003 to Word 2010 (2013)? New Daddy Word 3 01-14-2013 07:25 AM
trying to open a word 2010 document and opens the file conversion window starfish Word 2 05-24-2012 12:06 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:37 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft