Anyone knows if there's a way to export a picture shape into a file? If
possible without using the clipboard.
Thanks for any hints!
Luc

Re: export picture shape by Jean-Guy

Jean-Guy
Wed Oct 26 10:46:45 CDT 2005

Luc Benninger was telling us:
Luc Benninger nous racontait que :

> Anyone knows if there's a way to export a picture shape into a file?
> If possible without using the clipboard.
> Thanks for any hints!
> Luc

Save as HTML, all pictures will be extracted in a subfolder.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org



Re: export picture shape by Luc

Luc
Thu Oct 27 01:29:08 CDT 2005

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



Jean-Guy Marcil wrote:
> Luc Benninger was telling us:
> Luc Benninger nous racontait que :
>
>
>>Anyone knows if there's a way to export a picture shape into a file?
>>If possible without using the clipboard.
>>Thanks for any hints!
>>Luc
>
>
> Save as HTML, all pictures will be extracted in a subfolder.
>

Re: export picture shape by Jean-Guy

Jean-Guy
Thu Oct 27 07:55:48 CDT 2005

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
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org



Re: export picture shape by Luc

Luc
Fri Nov 04 05:57:39 CST 2005

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.


Jean-Guy Marcil wrote:
> 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.
>
>