PDA

View Full Version : Getting image embedded in Word



aniket123
02-27-2006, 03:43 AM
Hi all,

I've been going nuts over a seemingly simple problem.

I'm trying to get the control of an image embedded into an AutoShape in Word.

I'm not able to get the original image that was embedded, but I seem to get the image in the shape of the AutoShape. Whereas, in the Fill Picture Dialog, I can see the original picture. Hence, it has to be somehwere in the DOM. I can't seem to find it.

Any solutionz?

Thanks,
ANIKET

fumei
02-27-2006, 07:45 AM
Huh???? "Hence, it has to be somehwere in the DOM."

DOM?

aniket123
02-27-2006, 08:09 AM
Not the DOM. Sorry! got confused...
But somewhere in the Document Tree...
Cannot seem to find the control that would return me the original image...

- ANIKET

Killian
02-27-2006, 09:24 AM
DOM = Document Object Model (referring to web documents)

Aniket, can you post a sample page and the code you're currently using?

fumei
02-27-2006, 09:30 AM
Could you clarify what you mean by "return" the original image? And yes some code would be helpful.

I am suspecting that you will not be able to do this. The Word Object Model is very strange with how it handles images, and Shapes.

What EXACTLY are you trying to do?????

aniket123
02-28-2006, 01:25 AM
OK... heres a run down...

What I'm trying to do is, create a Word "template" with different AutoShapes and images embedded in those AutoShapes. The user can select a particular AutoShape and edit it. He can change the AutoShape to whatever he desires, and change the image to any other image that he wants.

Now, changing the AutoShape is the easy part, getting a handle of the image is what I'm not able to find... which means when I send this template to the user, he should be able to see the original image and change/edit/delete it through my application which works as an Add-on in Word.

Unfortunately, there is no code that I have written for it. This is the 1st step and I'm stuck here :)

I tried doing something a little more simpler. I tried inserting just an image (without any AutoShapes) into a Word document and tried (invain) to get control of the image. Got a dead-end at that too...

If it isn't this simple, then my guess is that it isn't possible...

Thanks a lot guys for the responses...
ANIKET