PDA

View Full Version : Solved: How to detect an image in a document



r054
02-22-2008, 11:55 AM
Hi,

I'm trying to detect images in a document. Is there a predefined bookmark or object that defines an image?

This is the big picture of what I'm trying to do:
I have an opened formatted document with images in the document. I need to copy paste the document as UNFORMATTED text while keeping the images.

My plan is to read the document, select from the beginning of the document up to the beginning of the first image, copy and paste it as unformatted text in a new document. Then go back to the original document, copy the image and paste to the new document. Back to the original select the text after the first image until the beginning of the next image, copy and paste it as unformatted text to the new doc and so on until the end of the document.

I'm not sure if this is the best way to do it. If you have a better idea or any suggestion, I'd really appreciate it.

thanks

senthilkumar
02-22-2008, 09:22 PM
@Hi Jolanda,

Can u pls give me some sample document. I want to kow the format of the text and type of images.

Thanks,
S. Senthil Kumar.

gwkenny
02-22-2008, 11:39 PM
Easy

What is unformatted text???????

Text that only has the normal style applied and nothing else.

Copy the entire document into a new file (this automatically includes your images). Apply the Normal style to the whole story.

That should do it. Well, unless you have tables, then you need to convert... but that should go without saying :)

:)

EricFletcher
02-23-2008, 08:34 AM
I'd certainly agree with gwkenny for how to do what you want here. However, to answer the specific question, a ^g code in a Find will find the next graphic. (In Find's More area, click Special to see the various options available. the corresponding code will appear when you click the word.)

fumei
02-24-2008, 06:44 PM
Whoa there gwkenny.

"What is unformatted text???????

Text that only has the normal style applied and nothing else."


I am going to have to disagree kimosabe. Anything with normal style attached is formatted. Yes, it is true that ClearFormatting - as a command - will indeed make the paragraph style Normal. However, it is NOT unformatted. It is formatted to whatever is the format of Normal.

TonyJollans
02-25-2008, 08:25 AM
Word 2007 -- no I don't think I'll confuse the issue -- let's just say there are now Document Defaults not necessarily the same as Normal.

As far as the original question - you want the text and the images in a new document? What bit of the old document do you *not* want in the new one?