Can I use a macro to insert pictures from a folder into Word?

Basically, I have folders containing pictures that we downloaded from our camera.  We want to be able to insert all of the pictures in the folder to a word document.  We would also like to have the file name (path not necessary) pasted directly beneath it.

Is this possible?

It would be nice to have a message window pop up asking the user to paste the address of the folder.

The folders will only contain pictures.
It would be an added bonus to be able to scale the images... maybe by including the option in the same window as the address input box?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sub Macro3()
' Macro3 Macro
' Macro recorded 7/20/2006 by Delana Harper

With ActiveDocument.Bookmarks(1)

LinkToFile:= _
False, SaveWithDocument:=True

End With

End Sub
I had this macro working you can try it and see if it gives desired results
mdemint1Author Commented:

Thanks, but this macro only inserts a single image.  What I am wanting is a macro that inserts every image in a folder.  The user should also be able to specify the address to the folder containing said pictures.
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Check out the following link. I am not sure how much help you can get from here but yeah may be:

You could try this
Sub InsertPictures()
Dim strFolder As String
Dim strFile As String
Dim ilsh As InlineShape

strFolder = "C:\Users\Public\Pictures\Sample Pictures"
strFile = Dir$(strFolder & "\*.*")
Do Until strFile = ""
    Set ilsh = ActiveDocument.InlineShapes.AddPicture(strFolder & "\" & strFile, False, True, ActiveDocument.Bookmarks("\EndofDoc").Range)
    ActiveDocument.Bookmarks("\EndofDoc").Range.Text = vbCr & strFile & vbCr
    strFile = Dir$()

End Sub

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mdemint1Author Commented:
All I had to change was:

strFolder = InputBox("Enter Folder Location", "Folder Location", "X:\")

Thanks so much!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.