Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I have different default settings, or templates, (font, margin, etc) when different file types are open in MS Word 2010? For example, .txt files should have a red font, .wri files green font and all others be unaffected (continue with the "factory" settings) when opened in Word.

share|improve this question
Using the term template is misleading. A Word template is a file which when opened creates a new Word file based on the template settings. It will always be a Word file. It will not open as a txt or wri file. So, just to clarify, you simply asking how to have specific formatting when opening these file formats? – CharlieRB Aug 21 '13 at 16:54
CharlieRB, yes, I do not care if Word opens the files "as word documents" but I would like to have different formatting according to what file types are being opened. – Gus Cavalcanti Aug 21 '13 at 17:02
That's what I thought you were asking. Unfortunately, I don't believe there is a native function within Word to do this. It will likely require some type of VBA or macro. I am not sure I can help, but hopefully someone here will be able to answer this question. – CharlieRB Aug 21 '13 at 17:07
up vote 1 down vote accepted

Create a macro in the template which checks the extension of ActiveDocument.Name, which is the current document's file name. Based on this value, set the desired font and formatting via VBA code.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .