You are on page 1of 1

Sub ImportFiles()

Const ImportFolder As String = "D:\path_of_photos\" ' Copy Paste photos path -


" ........\"
Dim pg As Page
Set doc = ActiveDocument
bFirst = True
strFile = Dir(ImportFolder & "*.jpg")
Dim i As Integer
Dim j As Integer
i = 0
Dim barArray() As String
ReDim Preserve barArray(100) 'nos photos no.
Dim txt As TextRange
Dim phFile As String
While strFile <> ""
barArray(i) = strFile
strFile = Dir()
i = i + 1
Wend
k = 1
For j = 0 To i - 1
Set pg = doc.Pages(k)
pg.ActiveLayer.Import ImportFolder & barArray(j)
For x = 1 To pg.Shapes.Count
If pg.ActiveLayer.Shapes(x).Selected Then
pg.ActiveLayer.Shapes(x).SetBoundingBox 2.500, 1.500, 1.3, 1.8 ' First two
digit for location and sencod two digits for size width and height
End If
Next x
k = k + 1
Next j
End Sub

You might also like