get inline image file name

L

Larry

I note that when I save a Word .doc file to .xml, the XML holds images
as binary data plus some XML elements. One such element is
<v:imagedata ...>; e.g,

<v:imagedata src="wordml://01000001.gif" o:title="duck"/>

Of interest to me is the fact that the original file name of the image
that was dropped into place is there in the o:title= attribute. Is
there any way, in VBA, for me to get that information without saving
to XML and literally parsing through the file?
 
C

Cindy M.

Hi Larry,
I note that when I save a Word .doc file to .xml, the XML holds images
as binary data plus some XML elements. One such element is
<v:imagedata ...>; e.g,

<v:imagedata src="wordml://01000001.gif" o:title="duck"/>

Of interest to me is the fact that the original file name of the image
that was dropped into place is there in the o:title= attribute. Is
there any way, in VBA, for me to get that information without saving
to XML and literally parsing through the file?
This is Word 2003 or 2007?

You say *.doc file, so I assume 2003... You could *try* the XML property
of the Range object. But I'm not sure if you have to parse the entire
DocumentObject.Content.XML or whether you can narrow it down.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 

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