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
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?
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.
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site:
http://www.word.mvps.org