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
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