Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting a JPG file after the current selection
Message
 
To
All
General information
Forum:
Visual Basic
Category:
VBA
Title:
Inserting a JPG file after the current selection
Miscellaneous
Thread ID:
00088683
Message ID:
00088683
Views:
57
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
Map
View

Click here to load this message in the networking platform