J
John Renkar
I am usingan Access database to store the name, description, and location of
Pictures that need to be inserted into a Word document. The following code
inserts the pictures, but they all appear at the top of the document in
inverse order instead of where they are supposed to be.
***********************************************
strSQl = "Select *from tblPictures"
Set rs = db.OpenRecordset(strSQl)
Do Until rs.EOF
'Type in name of Picture
Selection.TypeText Text:=rs!PicName
Selection.TypeParagraph
Selection.TypeParagraph
'Insert Picture
P1.InlineShapes.AddPicture rs!PicLocation, LinkToFile:=False,
SaveWithDocument:=True
Selection.TypeParagraph
Selection.TypeParagraph
'Type in description of Picture
Selection.TypeText Text:=rs!PicDescription
Selection.TypeParagraph
Selection.TypeParagraph
rs.MoveNext
Loop
rs.Close
*****************************************
The completed documents show Picture 3 then Picture 2 then Picture 1 then
the names and description.
How do I get the pictures to be placed between the names nd the
descriptions.
Thank youin advance for your help.
John
Pictures that need to be inserted into a Word document. The following code
inserts the pictures, but they all appear at the top of the document in
inverse order instead of where they are supposed to be.
***********************************************
strSQl = "Select *from tblPictures"
Set rs = db.OpenRecordset(strSQl)
Do Until rs.EOF
'Type in name of Picture
Selection.TypeText Text:=rs!PicName
Selection.TypeParagraph
Selection.TypeParagraph
'Insert Picture
P1.InlineShapes.AddPicture rs!PicLocation, LinkToFile:=False,
SaveWithDocument:=True
Selection.TypeParagraph
Selection.TypeParagraph
'Type in description of Picture
Selection.TypeText Text:=rs!PicDescription
Selection.TypeParagraph
Selection.TypeParagraph
rs.MoveNext
Loop
rs.Close
*****************************************
The completed documents show Picture 3 then Picture 2 then Picture 1 then
the names and description.
How do I get the pictures to be placed between the names nd the
descriptions.
Thank youin advance for your help.
John