Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inserting a JPG file after the current selection
Message
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
VBA
Titre:
Inserting a JPG file after the current selection
Divers
Thread ID:
00088683
Message ID:
00088683
Vues:
61
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
Fil
Voir

Click here to load this message in the networking platform