General information
Title:
Inserting a JPG file after the current selection
Hi There,
I am writing code in VFP that is creating objects in a Word 97 document. Near the end, I am trying to insert a JPG picture into the document after the current selection, which is collapsed to the insertion point. When I use the AddPicture method in the following code, the picture is placed at the top of the document:
With this.oOleApp.Selection
* .EndKey(6)
.MoveDown(5,10)
.Font.Size = 12
.Font.Bold = .t.
.Typetext("Comments")
.InsertParagraphAfter
* .EndKey(6)
.MoveDown(4)
.Font.Bold = .f.
.InsertParagraphAfter
.InsertAfter(ALLT(apt.comments))
.InsertParagraphAfter
.MoveDown(4)
EndWith
this.oOleApp.ActiveDocument.InlineShapes.AddPicture("y:\users\ben\wwwinappr\prop1.jpg",.t.,.t.)
I can't seem to figure out what to put in as the fourth parameter, which is the Range to replace the picture with.
Does anyone know how to insert an InlineShape picture object after the current selection?
Thanks in Advance,
Ben Holton
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only