How to get the range of a picture in a word document using VB?
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!
Re: How to get the range of a picture in a word document using VB?
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.
Re: How to get the range of a picture in a word document using VB?
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!