Alex Campbell
asked on
Need Word Macro to Select Graphics Files and Insert Each Separated by Hard Return
I need to be able to start a macro in a new or existing document that will:
1. Allow me to go to a folder.
2. Select individual graphics files in the folder.
3. Click on OK.
4. The graphics files would then be inserted into the document:
Graphics File 1
Paragraph Mark
Graphics File 2
Paragraph Mark
Graphics File 3
Paragraph Mark
...
Last File
Paragraph Mark
1. Allow me to go to a folder.
2. Select individual graphics files in the folder.
3. Click on OK.
4. The graphics files would then be inserted into the document:
Graphics File 1
Paragraph Mark
Graphics File 2
Paragraph Mark
Graphics File 3
Paragraph Mark
...
Last File
Paragraph Mark
Have you tried recording one? That should get you started.
ASKER
I recorded the following macro.
There are several limitations that I would like help fixing:
1) The folder that will be used will differ each time I use it.
2) The number of pictures chosen will vary each time I use ti.
3) The pictures come in touching other.
I want two or more hard returns/paragraph marks between them.
(see Before and After Pictures below).
After.jpg
There are several limitations that I would like help fixing:
1) The folder that will be used will differ each time I use it.
2) The number of pictures chosen will vary each time I use ti.
3) The pictures come in touching other.
I want two or more hard returns/paragraph marks between them.
(see Before and After Pictures below).
Sub GetPix()
'
' GetPix Macro
'
'
Selection.InlineShapes.AddPicture FileName:="U:\Captures\11-1027-00.jpg", _
LinkToFile:=False, SaveWithDocument:=True
ActiveWindow.ActivePane.SmallScroll Down:=-119
End Sub
Before.jpgAfter.jpg
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, just what I was looking for.