When there is an OLE object in a Word file (rtf or xml), does that object
include a bitmap picture of the OLE object to display if the program that
understands the ole object is not on someone's computer?
And if so, is how to get that image documented? And if so, where?
--
thanks - dave
Yes. take rtf file for example, the bmp object is included along with file, since you can find the object from rtf's source (see below).
>And if so, is how to get that image documented? And if so, where?
In rtf file, the bmp object is embedded after following line:
{\object\objemb{\*\objclass Package}\objw2115\objh765{\*\objdata
For more details on how rtf stores ole objects, please reference following document, especially Objects section:
[Rich Text Format (RTF) Specification, version 1.6]
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnrtfspec/html/rtfspec.asp
Thanks,
Rhett Gong [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp&SD=msdn
This posting is provided "AS IS" with no warranties and confers no rights.
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnic...@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"David Thielen" <thi...@nospam.nospam> wrote in message
news:74D9C5BE-AD5A-4D8C...@microsoft.com...
--
thanks - dave
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnic...@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"David Thielen" <thi...@nospam.nospam> wrote in message
news:5D7FAC55-6ECC-46D5...@microsoft.com...
Ok, but I am getting this object as a uuencoded string inside a Word rtf
file. And I need to use this from java (not Windows/C#). I was hoping that
there was a plain old bitmap in there somewhere which I could extract.
Is there a way to do this or is the objdata uuencode an OLE format that
needs to be passed to a Windows OLE API?
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnic...@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"David Thielen" <thi...@nospam.nospam> wrote in message
news:A07AF30F-E6A9-4003...@microsoft.com...
The rtf spec says that the binary data under objdata is the OLE data, not a
bitmap.
I tried saving to a WordML (xml) file also as that tends to be cleaner. It
had a large bindata named oledata.mso (I assume the OLE data) and a smaller
one named wordml://08000001.wmz. Any idea what format that is? It is not
bmp/png/jpg
--
thanks - dave
Yes, if you open a RTF file in notepad, you may find the bmp is presented as:
{\object\objemb{\*\objclass Paint.Picture}\objw1650\objh1950{\*\objdata
From the string, it is a embedded Paint.Picture object with 1650*1950 in twips.
|>I tried saving to a WordML (xml) file also as that tends to be cleaner. It
|>had a large bindata named oledata.mso (I assume the OLE data) and a smaller
|>one named wordml://08000001.wmz. Any idea what format that is? It is not
|>bmp/png/jpg
We can find following lines from .xml files saved from a rtf by Word:
<w:docOleData><w:binData w:name="oledata.mso">
....................
</w:binData></w:docOleData><w:docPr>
oledata.mso is a base64 encoded storage for ole objects. you may use IXMLDOMDocument/DOMDocument::selectSingleNode to load the docOleData node. I have
searched intranet but there are not any docs for resolving the mso object. If you need details on mso object, I suggest you contact Microsoft PSS for an intensive assistant.
In addition: for the schema about wordml, you can download the office schema Reference from:
http://www.microsoft.com/downloads/details.aspx?FamilyId=FE118952-3547-420A-A412-00A2662442D9&displaylang=en
I am parsing the word documents in java so I can't use the OLE API such as
IXMLDOMDocument. I have to write my own code.
Looking at WordML:
I agree that the oledata.mso is the OLE object - it's for the Equation
editor in the example I am playing with. And I think that is of no use to me.
But the 08000001.wmz I think is some kind of general picture of the output -
for when the program that created the OLE object is not on the system viewing
the document. I read the WordML docs but all it says about bindata is it is a
binary representation of the data - no info on the format.
So my questions is: What formats can binData hold? And what is the .wmz
format?
Looking at rtf:
It clearly has a \wmetafile as the result to draw the picture. But no where
does it explain the metafile format.
So my question is, where can I find the metafile format? And is there a
metafile viewer anywhere?
--
thanks - dave
"Rhett Gong [MSFT]" wrote:
> Hi Dave,
> |>The rtf spec says that the binary data under objdata is the OLE data, not a
> |>bitmap.
>
> Yes, if you open a RTF file in notepad, you may find the bmp is presented as:
> {\object\objemb{\*\objclass Paint.Picture}\objw1650\objh1950{\*\objdata
> From the string, it is a embedded Paint.Picture object with 1650*1950 in twips.
>
> |>I tried saving to a WordML (xml) file also as that tends to be cleaner. It
> |>had a large bindata named oledata.mso (I assume the OLE data) and a smaller
> |>one named wordml://08000001.wmz. Any idea what format that is? It is not
> |>bmp/png/jpg
>
> We can find following lines from .xml files saved from a rtf by Word:
> <w:docOleData><w:binData w:name="oledata.mso">
> .....................
Unfortunately, these formats are not documented anywhere. From your post, your need this information in your product to analyze the embedded binary data, so I suggest
you open an support incident to Microsoft PSS to discuss avaliable support options for you.
For your convenience, I attached steps to contact Microsoft PSS here:
dial 1-(800)936-5800 or by choosing one of the options listed at http://www.microsoft.com/services/microsoftservices/srv_support.mspx
Thanks for your understanding,
I tried that once before - the rtf & WordML formats are not supported by PSS
either.
thanks - dave
--
thanks - dave
But I will leave this post open in case if community member could shed some light. If there is any information from community, I will send a notification to you. Thanks for
your understanding.
Good luck,
Basically, a metafile is a series of GDI commands. It's created
by issuing GDI commands on a metafile DC. It can be played
by creating a DC off the metafile and then using BitBlt and/or
StretchBlt on an off-screen DC to get a bitmap representation.
Obviously none of this helps you much as a Java developer,
unless you step out of Java using JNI...
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnic...@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"Rhett Gong [MSFT]" <v-ra...@online.microsoft.com> wrote in message
news:rMgbFkc...@TK2MSFTNGXA01.phx.gbl...
But as you said, they should support it...
--
thanks - dave