InlineShapes object for Word Table

R

Ruby Tuesday

Hi, I have a row and a few colums of word table(e.g 6 cols, 1 row).

Cols 1,3,4,5,6 contains text, but col 2 contain image I inserted using
Insert->Picture->From a File, then I save it.

I was wondering if anyone can give me some example/clue on how to get the
information about the image I just inserted using a word macro or VB script.
For now, I just need to ge the path-filename and its size.

Thanks and you are greatly appreciated.
 
J

Jean-Guy Marcil

Hi Ruby,

You can only do that if it is a linked object. Then, I think, you can only
get the path and/or the name:
I do not think it is possible to get the size without writing some very
complicated code, but I could be wrong on that last one!

'_______________________________________
Dim PixName As String

PixName = Selection.InlineShapes(1).LinkFormat.SourceFullName
'PixName = Selection.InlineShapes(1).LinkFormat.SourceName
'PixName = Selection.InlineShapes(1).LinkFormat.Sourcepath
MsgBox PixName
'_______________________________________

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
R

Ruby Tuesday

Hi Jean-Guy, thanks for replying so quick.

If you remember that if you save that word docs into an html file, it save
the image that is in the word table cells in separate directory, and then
linked thru the href html tags from the main html documents. Perhaps there
are ways to extract that image and its size, may be some word table guru or
VB guru can shed us some lights.

Thanks
 

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