Thread: [Solved] Determining merge order
View Single Post
 
Old 06-16-2014, 05:17 PM
gmaxey gmaxey is offline Windows 7 32bit Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,601
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

DIR won't return files in alphabetical order. You can try filesystemobject:

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oFSO As FileSystemObject
Dim oFolder As Folder
Dim oFile As File
  Set oFSO = New FileSystemObject
  Set oFolder = oFSO.GetFolder("Your folder path")
  For Each oFile In oFolder.Files
    Debug.Print oFile.Name
  Next oFile
  
  
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote