Information générale
Titre:
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
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement