This project has moved. For the latest updates, please go here.

Detecting tables and images in word document .doc

Jun 12, 2012 at 12:48 PM

Hello,

I am iterating through paragraphs in a word document Net office API. So far i did not have a problem detecting different headings by using the style object. However now i have a situation that contents inside a table have the same style as those outside it. I need to figure out a way to understand when the paragraph in question is actually a table.

I have similar need to figure out when paragraph is actually an embedded image.

When i physically select a table or image in the word document i can see that tools section above format changes. When an image is selected it is "Picture tools" when a table is selected it is 'Table tools" and when a normal paragraph is selected the tools section does not show.

How can i detect this behavior using word interop/Net office API?

Thanks Sameer