![]() |
|
#8
|
|||
|
|||
|
Thanks for the suggestion Guessed! The issue is however not to get the image files out, but to get them back in at the correct place. And since the problem originally is the various image formats used within Word, simply using the ones in the zip file won't work.
Getting images into a Word doc is not a problem, this small code inserts the three test images I made in a sequential order. Code:
Sub InsertImage()
Dim i As Integer
For i = 1 To 3
Selection.InlineShapes.AddPicture FileName:= _
"C:\path\test" & i & ".png", LinkToFile:=False, _
SaveWithDocument:=True
Next i
End Sub
Macropod, the png images I want to include in the document are also sequentially numbered, and I know there is a way to walk through all InlineShapes in the document (i.e. sequential). And since it is also not a problem inserting an image at a selection, why would this be impossible? I am a VBA newb, so I'm just trying to figure stuff out... but getting a "that's not possible" answer when I see the outlines of a solution only wants me to dig deeper. I am thinking of something like this (pseudocode): Code:
For i = 1 to numberOfInlineShapesInDoc Select InlineShape Delete InlineShape Insert image_i.png 'one of the sequentially numbered images Next i |
| Tags |
| change, figures |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Replacing multiple words at once in excel document
|
Legaly | Excel | 2 | 05-23-2014 08:30 AM |
Insert images with incrementallly-numbered filenames
|
mqx | Word VBA | 4 | 11-13-2013 11:22 AM |
Number position for numbered list of images
|
ofey | Word | 3 | 09-29-2013 02:51 AM |
| Replacing text string within document, it's not retaining formatting | livemusic | Word | 4 | 02-25-2013 12:33 AM |
Flowing Numbered Lists Around Images
|
Paul_A_Parks | Drawing and Graphics | 5 | 03-09-2011 10:22 PM |