T
text news
Sorry, a bit of a beginner...
I want to be able to print a batch of pages which are all the same except
for a photo which has to be inserted . Each page has a different photo.
For example I have 5 photos called "001.jpg" to "005.jpg"
My document has a space in the top right hand corner where the photo has to
go.
The first page needs to print with photo "001.jpg" inserted.
The second page with photo "002.jpg" etc.
The only thing that changes is the photo.
I had a bit of a play and something like this seems to be part way there:
(This is embarrasing! I hope you do not injure yourself laughing!)
-----------------------------
Dim check, counter
check = True: counter = 0
Do
Do
Selection.InlineShapes.AddPicture FileName:= _
"c:\temp\001.jpg" _
, LinkToFile:=False, SaveWithDocument:=True
counter = counter + 1
If counter = 3 Then
check = False
Exit Do
End If
Loop
Loop Until check = False
------------------------------
But I have no idea how to increment the filename with each loop so that the
first time it loads 001.jpg and the second time 002.jpg etc.
If anyone can help me I shall be very grateful but please keep it dead
simple.
Many thanks
Les
I want to be able to print a batch of pages which are all the same except
for a photo which has to be inserted . Each page has a different photo.
For example I have 5 photos called "001.jpg" to "005.jpg"
My document has a space in the top right hand corner where the photo has to
go.
The first page needs to print with photo "001.jpg" inserted.
The second page with photo "002.jpg" etc.
The only thing that changes is the photo.
I had a bit of a play and something like this seems to be part way there:
(This is embarrasing! I hope you do not injure yourself laughing!)
-----------------------------
Dim check, counter
check = True: counter = 0
Do
Do
Selection.InlineShapes.AddPicture FileName:= _
"c:\temp\001.jpg" _
, LinkToFile:=False, SaveWithDocument:=True
counter = counter + 1
If counter = 3 Then
check = False
Exit Do
End If
Loop
Loop Until check = False
------------------------------
But I have no idea how to increment the filename with each loop so that the
first time it loads 001.jpg and the second time 002.jpg etc.
If anyone can help me I shall be very grateful but please keep it dead
simple.
Many thanks
Les