views:

40

answers:

3

Hi, When we try to save msword doc file as html file we get "wmz" files for the math equation objects.

I tried decompressing the wmz file and saving the content as jpg.

I can open this jpg file in the "Microsoft Picture manager" properly. But trying to open the file in browser displays the error message "The image cannot be displayed, because it contain errors".

What is the procedure to decompress this wmz file and convert it to jpg. What will be the extension of decompressed file?

+2  A: 

When you save your Word documents as "Web Page, filtered" you won't get these WMZ files but just PNG files. Set the "Web Options" to target to a low version of IE (i.e. 4.0) and check "allow PNG files" and "disable features not supported by these browsers". Added advantage is that the webpage will display better in different browsers.

However, you should do all of this after you first make a copy of your document (and associated files) using Explorer into another location. Open this copy with Word and then Save as "Web Page, filtered". The original you keep for editing. (Don't save the original as a "web page, filtered" or you will loose the ability to edit the equation objects).

Peladao
+1. Good answer.
Otaku
Thanks, but i copy the content to clipboard and process the images in temp location and move them to permanent location and save the clipboard content as html.This is were i can't properly handle the wmz files.
Thiyaneshwaran S
+1  A: 

.WMZ seems to be a zipped .WMF file.

You can open the unzipped file with a picture view/editor (just tried IrfanView) and save as .jpg.

devio
A: 

Thanks for the help. Finally i could not remove the black background from the image file. So using the round about approach for now

1)Decompress the wmz file to byte array(wmf).

2)Open a new word document

3)Paste the byte array into word document.(this document should only contain this data, and no other extra information)

4)Save the doc as html file (WdSaveFormat.wdFormatFilteredHTML)

5)open the "_files" directory created for the html output

6)Find the only "gif" file created inside the directory

Thiyaneshwaran S