Start a new topic

Handling docm and other unknown file types

Yesterday I had 2 files from two clients that had the doc format (= doc w/ macros). CT tried to import this as docx, but obviously failed (it imported something, but only chunks of rare characters). I do not know whether this format is XML-based, but I assume that yes.


If there are more to come, I would perhaps ask to include this file type, but at the moment I would like the routine as it is actually the case with doc files to be implemented (also for any unknown file format where CT – still – fails to import it), showing a message that this format is not supported.


Igor, any chance that we get docm support in the near future?

 

Can't you just convert them to *.docx (and back), in MS Word, or using textutil?


H.

Hi Woorden,
textutil... I tried, it failed.
As for converting to docx and then back to docm, I'm afraid I will lose the macros in the first conversion... (seems logical to me, but I may be wrong). 

Alain: I'm afraid I will lose the macros in the first conversion...


I can't find a single *.docm on my Mac to try, but I don't think so. I think the macros will still be there, just not automatically active.


H.

Yes, you will always lose the macros, no matter what conversion methods you use.


The macro part is a vbaProject.bin file inside the zipped docm file that will get lost when converted to docx. See here:



This sounds pretty easy (but even brain surgery sounds easy). Read also under https://msdn.microsoft.com/de-de/library/office/gg188063.aspx (in German).


And indeed the format is quite rare. But I assume people that use it know why they need macros (and for this reason do not have docx).

Thank you tre for confirming.

Indeed it's a doc file with macros. I tried to open it with Studio, it failed (says it has modifications not approved, but I accepted all modifs and deactivated the function, so the file is clean).
Converted to docm and tried to open with Studio, it failed, saying that this docm is not supported (converted with MsWord 201, tried to open with Studio 2014).

My last solution was CT's clipboard worflow, but for some reason (that I ignore) it's not efficient (it was a few years ago, then it started to behave crazily).

Torsten: But I assume people that use it know why they need macros (and for this reason do not have docx).


Or don't send you a *.docx with macros?


But you're right, your link says: Der Aufgabe der Konvertierung eines Dokuments mit Makros in ein Dokument ohne Makros besteht daher hauptsächlich aus dem Entfernen des vbaProject-Teils aus dem Dokumentpaket. That sounds easy, it probably even is easy, but how on earth do you get them macros back?


H.

Hi Alain,


Can you submit a support ticket and attach a sample .docm document to it?

OK Igor

 

@H.


No, any docx with a macro will be automatically saved as docm, this is at least what MS says.


You will only be able to save the macros

  • by processing the docm file just like a docx (and keeping the file mentioned above in its place)
  • by unzipping the translated docx and put back the file mentioned above in its place and pray that the macros keep working (theoretically it should work, well, theoretically …)



With "processing the docm file just like a docx" I was referring to add docm as a file type …

How about if you simply rename the .docm extension to .docx and create a CT project with it?

Igor, I just tried. The file was imported, very clean, but if I try to display a preview or to export it, CT displays an error.

 

As I said, I can't try, but LibreOffice?


H.

Login to post a comment