Problem loading picture in Forms.Image

O

oulaup

Hi, i "use" VB6 to open MS Word document and fill Forms.Image
controls.
The problem is that when i execute function below in VBA works,
but when i
execute this function in VB6 it i get this error:

Run-time error -2147418113 (8000ftfty):
Method Picture' oF object 'Ilmage' Failed

My code :

For Each sh In ActiveDocument.Shapes
If sh.OLEFormat.ClassType = "Forms.Image.1" Then
With sh.OLEFormat.object
.BackColor = wdColorWhite
.BackStyle = fmBackStyleTransparent
.AutoSize = False
.PictureAlignment = fmPictureAlignmentCenter
.PictureSizeMode = fmPictureSizeModeZoom
.Picture =LoadPicture("image path file")
End With
end if
next
 
W

Word Heretic

G'day oulaup ([email protected]),

Need to define a Word object and use the function on it.

MyWordApp.LoadPicture...


Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


oulaup reckoned:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top