Thanks for replying. Unfortunately that's not working for me, as I
cannot save the doc as html because users will continue working with the
doc after my code has run.
To be a bit more specific: I'm trying to put a word picture shape onto a
vba userform. At run-time. So, if I could get an IPictureDisp reference
to the picture in the shape....??? Or is there an other workaround for this?
Thanks a lot
Luc
Luc Benninger was telling us:
Luc Benninger nous racontait que :
> Thanks for replying. Unfortunately that's not working for me, as I
> cannot save the doc as html because users will continue working with
[quoted text clipped - 5 lines]
> workaround
> for this?
If I remember correctly, to put a picture on a userform. you need a file...
Normally, you use something like:
UserForm1.Photo1.Picture = LoadPicture(strFile)
where strFile is the full path to a picture file.
If the image must come from the Word document itself, then you have to
hardcode the info in the document so that the userform can locate the
picture file:
Image1.picture=LoadPicture("c:\windows\argyle.bmp")
You should be able to get the path\filename of a picture in an
IncludePicture field in your document by parsing the code of the field.

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Luc Benninger - 04 Nov 2005 12:57 GMT
My code should work if the picture isn't available as file, too. I know
I could use the clipboard win api to create a (temporary) picture file
out of the shape in the document and then assign it to the image control
on the userform. But as this will overwrite any previous content of the
clipboard, I don't think this is a good solution.
> Luc Benninger was telling us:
> Luc Benninger nous racontait que :
[quoted text clipped - 25 lines]
> You should be able to get the path\filename of a picture in an
> IncludePicture field in your document by parsing the code of the field.