Trouble trying to use a .dotm Word template to create a new Writer file

LibreOffice 25.2.6.2 520(Build:2)

I searched around but found no suitable posts on this topic…

I am ‘supposed’ to use a .dotm Microsoft Word template file to write two chapters that I’m contributing to a new book. I’d prefer to just use LO if possible.

I’ve read Chapter 4 in the LO 25.2 Guide about how to work with Templates, starting with the section “Importing Templates” on page 170. I see how to select a template from a location on disk. The file types show in the “File type:” field include .dotx but not .dotm.

I believe I would need to convert my .dotm template to a .dotx file. How can I do this? I did a search and it seems that there are a few web sites that offer conversion tools. My first question is to ask if anyone has had any luck with any such tool in particular.

Or, is there a way to just import a .dotm template directly? I tried to import the .dotm template using the dialog to specify a file on my local system. But the dialog box error said “File not found” despite the file being where I had specified.

Thanks in advance,

Just FYI… I tried converting the .dotm to a .ott file directly using the tool at this location:
https://convertall.com/en/dotm-to-dotx

I’m going to test it and I’ll report back here…

Writer can supposedly open .dotm files (Chapter 10, Working with File Formats, Security, and Exporting)

  • Why don’t you open the dotm file and save it as a writer (ott) template?
  • It is advisable to work with open document formats and when they are finalized, convert them to other formats

Well, I have not been able to read the .dotm file directly.

Here is the scenario:

  1. I select File → New → Templates…
  2. I select “Text Document” in the Application type drop down box
  3. I select my login name from the “All Categories” drop down box
  4. I select “Import” from the “Manage” drop down box.
  5. I select my login name from the “Select Category” dialog
  6. I select the .dotm file on disk in the file chooser dialog
  7. I get the error "Error importing the following templates to rhimbo:
  8. LO hangs for about 30 seconds with the window ‘whited out’
  9. LO recovers after about 30 seconds.

“rhimbo” is my login name.

Well, this seems to have not worked. The styles that should be present are missing.
I might just have to go to the public library to use their Windows machines and Microsoft Office.

A .dotm contains macros, best to find out what they do before deleting them by conversion to .dotx.

It might be best to write your two chapters in Writer then paste as unformatted text into Word that has the .dotm loaded and just do the styling in Word at the library. Check if the library Word will run macros.

1 Like

Thanks much. Yeah, that is what I had resigned myself to do.

I’ve written the chapters already using LO. I saved them as .docx files. So I’ll take them with me, just copy and paste the entire contents into a .docx file created from the .dotm template and then apply the styles.

I think I said that correctly above–create a .docx from a .dotm…!

In general, is it still the case that LO is going to have trouble with macros in any of the Microsoft Office products?

I strongly suggest to paste as unformatted text or you might get styles carried over that overwrite the styles in the blank document created by the template

In general: Yes. There are some differences in Basic itself. The Option VBAsupport 1 helps, but the way to access the document differs from the UNO-api, used by LibreOffice. So you need to test your macros carefully.

OK, thanks @Wanderer

I created a .docx file from the .dotm and edited that. Just for fun I opened the .docx in LO. I could see some of the “Styles” tab styles, but not all of them. Sheeesh…! I hate Word… What a pain in the ass. Well, I only have to get through the formatting of my two chapters and then I’m done.

I am sure it’s a big undertaking, but it would be great to have a converter that could translate .dotm files to .ott files and translate Microsoft macros to LO macro definitions.

Thanks, @EarnestAl

Yes, good suggestion. I will paste just the unformatted text. To be honest, usually I do that, but this time I just copied and pasted the entire 60 pages into the .dotm file. I had no real formatting to speak of in the .odt file, everything ‘Body Text’ (no manual formatting to change font or anything like that), and I changed some text to italics manually.

Still, I think I should now start over… make a new .docx from the .dotm and paste unformatted text from the .odt file.

Thanks…