I created this yesterday for someone else who posted with a similar request
to the drawing.graphics newsgroup
The following code will display a dialog in which you can select the folder
that contains the picture files and then it will insert each of the pictures
into a document with the filename of each following the picture
Dim myFile As String
Dim PathToUse As String
Dim myDoc As Document
Dim myrange As Range
'Select the folder that contains the files
With Dialogs(wdDialogCopyFile)
If .Display <> 0 Then
PathToUse = .Directory
Else
MsgBox "Cancelled by User"
Exit Sub
End If
End With
'Close all open documents before beginning
Documents.Close SaveChanges:=wdPromptToSaveChanges
'Get the new title to be used for each document
Documents.Add
myFile = Dir(PathToUse & "*.*")
While myFile <> ""
With ActiveDocument
Set myrange = .Range
myrange.Collapse wdCollapseEnd
.InlineShapes.AddPicture PathToUse & myFile, , , myrange
Set myrange = .Range
myrange.Collapse wdCollapseEnd
myrange.InsertAfter vbCr & myFile & vbCr
End With
myFile = Dir()
Wend
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP, originally posted via msnews.microsoft.com