16 Replies Latest reply on May 21, 2013 2:57 PM by TObject

    Placing word documents with embedded metafiles

    TObject Level 1




      I have a Word document with Windows Metafile embedded pictures (with .EPS extensions). The pictures are math formulas, and I am not sure what tool they were created with.


      I open the document with Word 2010. I tried saving the document in both doc and docx format before placing in InDesign. But with ether format the following issue persists.


      The embedded metafile images look fine in Word, however after placing them in InDesign, the individual elements and clipping paths inside the embedded metafile images change their relative to each other positions, so the formulas start looking very wrong – individual symbols collide and/or get clipped.


      Why is this happening? Is there a way to work around this issue?


      I am on Windows 7 and InDesign CS 6.0.



      Thank you

        • 1. Re: Placing word documents with embedded metafiles
          tman69 Level 3

          try saving word doc as a PDF--then place PDF into InDesign

          • 2. Re: Placing word documents with embedded metafiles
            TObject Level 1

            Yes, exporting from Word to PDF, the embedded metafiles have the correct appearance. They continue to look good when placing the PDF file in InDesign.


            But there is no way to reflow placed PDF files like placed Word files, is there?


            Thank you

            • 3. Re: Placing word documents with embedded metafiles
              MW Design Level 5

              It sounds like you have a MathType document. MrMathType from dessci.com (Design Science) posts here. But you might want to pop over to their web site and see if there are any faqs or support documents that may help you:




              Failing that, try sending him a PM:



              Take care, Mike

              • 4. Re: Placing word documents with embedded metafiles
                TObject Level 1

                According to the author, the metafiles were placed in Word 2003 as ‘mathematical equation 3.0’ objects. I tried opening these with MathType 6.9 but it is able to open only a very small subset of the many equations in the document.


                I emailed Design Science for their opinion, but I am afraid that something similar to what is described in the article ‘Equations have become non-editable “pictures” in Microsoft Word’ may have happened to the documents I am working on.

                Here is the article:


                The frustrating part is that equations look all right in Word, or when exported from Word to PDF. But the way Adobe reads WMF metafiles, they get messed up.


                One such difference – Empty instead of Auto kerning is described in the following thread:


                But this is not the only issue. For some metafiles, blindly setting all kerning to auto messes them up. Some other metafiles exhibit bizarre vertical positioning of elements and/or shifts of clipping paths. The combination of these issues makes it very complex to write one-fits-all script to ‘fix’ the metafiles automatically.


                It appears I need to find the appropriate Microsoft libraries to correctly load WMF files into some intermediate vector format, matching Microsoft Word rendering exactly, and then export into EPS or something else that InDesign is capable of processing without repositioning elements.


                Any ideas what these libraries may be?


                Thank you

                • 5. Re: Placing word documents with embedded metafiles
                  MrMathType Level 3

                  I've been laying low for several reasons, but mainly because you've already emailed our tech support folks. I'm in a different office across the country from them though, and wouldn't mind looking at one of the documents that's giving you problems. Can you attach it here or upload it to a Dropbox or other cloud folder?




                  • 6. Re: Placing word documents with embedded metafiles
                    TObject Level 1

                    Dear Bob,



                    I appreciate any guidance you can give me.


                    Here is a one-page Microsoft Word document with a few of the equations in question:




                    MathType 6.9 on my Windows 7 computer recognizes only one equation on this page.




                    Thank you

                    • 7. Re: Placing word documents with embedded metafiles
                      MrMathType Level 3

                      Thanks. I've looked at the document (on both Windows and Mac OS), and see the same problems you see. However, I believe your initial assessment was correct, that the objects have become corrupted somewhere along the way. I've also discussed this with Derrick, one of our Support Engineers, and we agree that unfortunately the only recourse is to create new versions of each of these equations, and replace the old ones in the document. The article you linked to explains why, but for the benefit of others who may be following this thread, there are several things that could cause this. The article points to Word's AutoSave feature as one cause, though there are others. Word has never done a real great job of handling huge numbers of "objects" of any type, and if you had a lot of embedded charts in your document, we may be having the same discussion, but with a different type of corrupted objects. That's not to just shrug my shoulders and say "hey, it's not our fault", but this is one area where we do all we can do and sometimes it's not enough. I believe Microsoft has a great product, and I believe we do too. Just like we appreciate hearing when our products don't perform as desired, so does Microsoft. There's a feedback link in the article you linked above. Report this to MS if you want, but the report may not be very effectual since it deals with a 10 year-old version of Word.

                      1 person found this helpful
                      • 8. Re: Placing word documents with embedded metafiles
                        Ellis home Level 4

                        Try this:


                        1) Select All

                        2) Open a New Word Document

                        3) Edit/Paste Special/Picture (Enhanced Metafile)

                        4) Save


                        Then Place it in ID. See how it works.

                        • 9. Re: Placing word documents with embedded metafiles
                          Joel Cherney Level 5

                          I was able to get the equations to render identically to the Word preview by


                          1) resave file as .docx

                          2) rename file extension from .docx to .zip

                          3) unzip and extract

                          4) open .wmf files in Illustrator CS4


                          So it's not Adobe per se:

                          But the way Adobe reads WMF metafiles, they get messed up.

                          but InDesign's Word filter that reads the embedded WMFs incorrectly. I am unsurprised by this - there are many circumstances where InDesign's Word filter causes ruination of embedded graphics.


                          I can envision a tedious process where you resave all of the embedded WMFs as AI files, remove all of the equations from the source Word file, place that file in ID, and then re-place all of the equations as inline anchored objects.  Perhaps MrMathType will be able to come up with a process that is not as labor intensive as the manual-dismantling-and-reconstruction process? When I look at the guts of the extracted WMF files in NotePad++, I certainly see the word "MathType" in there, so MrMathType might be able to figure something out. But my gut feeling is that success here would be dependent on the degree to which Word has scrambled the equations in the first place.

                          • 10. Re: Placing word documents with embedded metafiles
                            TObject Level 1

                            I believe I have a semi-automated solution that fixes most of the WMF formatting issues. This is a very raw workflow and needs refining, however I am excited to post it right away.


                            1. If not already in the docx format, then save the document as docx.
                            2. Rename the .docx file into .zip, and unzip everything.
                            3. Use the Dirk Struve’s free EMFtoEPS utility (http://www.projectory.de/emftoeps/) to convert all wmf files in the \word\media folder from WMF to EPS using the Adobe PDF printer driver set to PDF/X-1a.
                            4. You cannot yet use the EPS files due to some strange missing font issue. Open the Acrobat Distiller; set the PDF/X-1a option, then drag-and-drop all the newly created EPS files to the Distiller. The Distiller converts the EPS files to PDF and fixes the font issues in the process.
                            5. Edit the \word\_rels\document.xml.rels file to replace all occurrences of .wmf with .pdf
                            6. Optionally, delete all the .eps and .wmf files in the \word\media folder.
                            7. Zip everything back up into a .docx document.
                            8. Now you can place the docx document in InDesign.


                            Thank you to everybody who contributed. I appreciate your help.

                            • 11. Re: Placing word documents with embedded metafiles
                              MrMathType Level 3

                              Thanks for the update. I was able to follow the process and it worked perfectly. Too bad they're not editable by MathType.


                              @Joel, I also saw the word "MathType" in the WMF, but Word still sees it as an image. Looking into the document.xml file in the unzipped docx, there's nothing there that would indicate this equation or any others in the document can be repaired. There are times when that can be done, and I've done it, but not in this case.

                              • 12. Re: Placing word documents with embedded metafiles
                                TObject Level 1

                                Thank you for confirming the method works. I am going to mark it as correct answer, so it is easier for people to find it in the thread, as technically it is an answer to the original question.


                                Unfortunately, the resulting equations cannot be edited not only in MathType; we are also losing the ability to edit them in Illustrator.


                                For some reason Illustrator cannot deal with PostScript embedded fonts at all. Furthermore, once an embedded font is specified for a text element within an EPS file, Illustrator is incapable of using this font even if the font is installed in the system. InDesign also gets messed up by embedded fonts; this is why we need the extra step with Distiller to package all the rendering into the PDF engine.


                                I experimented with different settings, but so far I was unsuccessful in finding a way of converting WMF files, using device context that matches rendering of Microsoft Word, and at the same time NOT to embed any fonts into the resulting EPS file.


                                To summarize, the method works, but resulting equations become uneditable even in Illustrator.

                                • 13. Re: Placing word documents with embedded metafiles
                                  MrMathType Level 3

                                  Right. FYI, here's what the first equation looked like to me in AI CS6 Win:


                                  At least Omega came through unscathed. ;-)

                                  • 14. Re: Placing word documents with embedded metafiles
                                    TObject Level 1

                                    Precisely. Thank you for verifying.

                                    • 15. Re: Placing word documents with embedded metafiles
                                      Joel Cherney Level 5

                                      When I dropped the WMF files directly into Illustrator, all I had to do was clear unnecessary tracking, and they looked fine:



                                      1 person found this helpful
                                      • 16. Re: Placing word documents with embedded metafiles
                                        TObject Level 1

                                        Dear Joel,


                                        Thank you for your input. Yes this particular equation greatly benefits from resetting all kerning to 0 or Auto.


                                        I made an Illustrator action to apply this fix to all equations. Unfortunately, this script badly messes up some of the equations (those that space out elements from a single layer to different places within equation).


                                        I have 907 equations in just one chapter, and it looks like I would have to approach them on one-by-one basis.