Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word Basic and pictures

Status
Not open for further replies.

Francis

Programmer
Jan 26, 1999
124
0
0
GB
Hello
I am trying to use Word Basic to import a collection of picture files into a document, one on each page.
I can create the page throws ok and bring in the pictures, but I can only get them all the first page.
How can I do this please.
Thanks
 
Try inserting a section break after inserting each picture.

Selection.InsertBreak Type:=wdSectionBreakNextPage
 
Thanks, I tried that, but it still does not work. All the section breaks appear, but all the diagrams are still on the first page. By using InlineShapes I can stop them being on top of each other, but I cannot seem to place them on each page.
Any other ideas?
 
I have worked around the problem by cutting each picture from the start and pasting at the end as follows

‘Each picture is added as a Shape object

Set Shape = ActiveDocument.Shapes.AddPicture(mypicfile$, False, True)

'that put the picture at the document start, now must move it to the end

‘first convert to an inline shape
Set ishape = Shape.ConvertToInlineShape
ishape.Select
.Cut
'go the the end and then paste
ActiveDocument.Paragraphs.Last.Range.Select
'ActiveDocument.Select
.Collapse Direction:=wdCollapseEnd
.Paste
 
You also might want to check out the "float over text" option in the format picture position panel (after inserting the picture). It should not be checked (each picture must be unchecked), and your pictures will then fall on each page (assuming a page break).

Dan
 
Thanks
I think that the ConvertToInlineShape does that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top