Click to See Complete Forum and Search --> : How to get the range of a picture in a word document using VB?


Tang Min
August 8th, 2001, 07:52 AM
My qestion is as following:
In an application, I have to process a word document line by line, that is I should tell the content of every line of the document. There is no problem for the text. But How do I know the paragraph is text, picture or shape? If it is a picture of shapes, how can I get the range (from which line to which line) of the it? Any help is appreciated!

Krysia
August 8th, 2001, 01:11 PM
Use Shapes collection or InlineShapes collection. to get shape
A collection of InlineShape objects that represent all the inline (in text layer) shapes (picture, OLE object or ActiveX controll) in a document, range, or selection.
A collection of Shape objects represent all the shapes (in drawing layer) in a document or all the shapes in all the headers and footers in a document.

Tang Min
August 9th, 2001, 04:26 AM
Dear Krysia:

Thank you very much for your quick help. But as you know, I am beginner on VBA, so would you like to show me some examples! Thank you again for your attention!