Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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. –  Gustavo Cavalcanti Aug 21 '13 at 17:02
1  
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

1 Answer 1

up vote 1 down vote accepted

Create a macro in the Normal.dot 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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.