Group:  General ยป microsoft.public.office.xml
Thread: Images In Word File with xml

Geek News

Images In Word File with xml
"Jeff" <offload[ at ]verizon.net> 12/13/2008 12:32:17 AM
I can open a blank word document and save it as a xml file and I have built
a form
I use this way but now I need to put in a simple logo with a .gif or bmp or
what ever
but I can seem to get it to work.

I can add this ot the blank document before saving to xml and it works fine
but
if I cut and paste the xml code for the picture into another blank xml sheet
it
come up with an enpty picture in the file.

I am at my wits end searching the web for examples that dont seem to work

Is there another way to do this that anyone could share with me?

any advice would be helpful, this seems so simple

Regards

Jeff W.


Re: Images In Word File with xml
Peter Flynn <peter.nosp[ at ]m.silmaril.ie> 12/13/2008 10:13:41 PM
Jeff wrote:
[Quoted Text]
> I can open a blank word document and save it as a xml file and I have built
> a form
> I use this way but now I need to put in a simple logo with a .gif or bmp or
> what ever
> but I can seem to get it to work.
>
> I can add this ot the blank document before saving to xml and it works fine
> but
> if I cut and paste the xml code for the picture into another blank xml sheet
> it
> come up with an enpty picture in the file.
>
> I am at my wits end searching the web for examples that dont seem to work
>
> Is there another way to do this that anyone could share with me?
>
> any advice would be helpful, this seems so simple

Images in Word XML documents are stored in an encoded format (eg
UUencode). They can only be displayed by Word or another program (eg
OpenOffice) that understands what to do with the encoded data (ie find
it and decode it to an image). In WordML the image data is inline to its
location in the document. In OOXML the image data and the image
reference are separated by another level of indirection, via an ID/IDREF
link. To create this externally under program control you will need to
study the internal details of the mechanism and get all the components
right (using a toolkit is the best way).

> this seems so simple

Wordprocessor internal formats are not simple because they must allow
for all conceivable random behaviours, both by the user and by the
program. There are many other much easier formats to generate and
manipulate, but their end-user interface requires more foreknowledge or
training, whereas Word can be used by anyone with no knowledge at all
(and often is :-)

///Peter
Re: Images In Word File with xml
"Jeff" <offload[ at ]verizon.net> 12/15/2008 6:21:44 PM
Peter, Thank you for responding to my questions, I did however figure out
what was happening

I use UltrEdit to type in my xml/Wordml code and I had converted the xml to
Cr/Lf's and this was
scattering my binary image data which made it un recognizable once this was
done

Right now I can cut sand paste binary image data from one file to another
and it is working great
and that all I wanted to do...

Thanks


Jeff W.



"Peter Flynn" <peter.nosp[ at ]m.silmaril.ie> wrote in message
news:6qiqclFcfrd7U1[ at ]mid.individual.net...
[Quoted Text]
> Jeff wrote:
>> I can open a blank word document and save it as a xml file and I have
>> built a form
>> I use this way but now I need to put in a simple logo with a .gif or bmp
>> or what ever
>> but I can seem to get it to work.
>>
>> I can add this ot the blank document before saving to xml and it works
>> fine but
>> if I cut and paste the xml code for the picture into another blank xml
>> sheet it
>> come up with an enpty picture in the file.
>>
>> I am at my wits end searching the web for examples that dont seem to work
>>
>> Is there another way to do this that anyone could share with me?
>>
>> any advice would be helpful, this seems so simple
>
> Images in Word XML documents are stored in an encoded format (eg
> UUencode). They can only be displayed by Word or another program (eg
> OpenOffice) that understands what to do with the encoded data (ie find it
> and decode it to an image). In WordML the image data is inline to its
> location in the document. In OOXML the image data and the image reference
> are separated by another level of indirection, via an ID/IDREF link. To
> create this externally under program control you will need to study the
> internal details of the mechanism and get all the components right (using
> a toolkit is the best way).
>
> > this seems so simple
>
> Wordprocessor internal formats are not simple because they must allow for
> all conceivable random behaviours, both by the user and by the program.
> There are many other much easier formats to generate and manipulate, but
> their end-user interface requires more foreknowledge or training, whereas
> Word can be used by anyone with no knowledge at all (and often is :-)
>
> ///Peter


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net