Re: using a template to open a text file



PS... the formatting Word uses for text files is determined by a style. When you open a text file, Word applies the Plain Text style to what you opened. By default, Word is using Normal.dot (or Normal.dotm in Word 2007) for the formatting. So, the approach of applying a template to it would work immediately only if you were to redefine the Plain Text style... which I don't think you want to do.

Rather than that, using Graham Mayor's suggested AutoOpen macro provides one solution.

An easier and perhaps quicker solution would be to press Ctrl+A, then Ctrl+Shift+N, which applies the Normal style to the text document, giving you a starting point that has your basic formatting defaults.

Another option is to use Word's AutoFormat command, which will also convert text with hard line breaks into wrapped paragraphs as well as apply heading styles where appropriate (usually): Format - AutoFormat.

--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com


"Herb Tyson [MVP]" <herb@xxxxxxxxxx> wrote in message news:e5onPln1IHA.5560@xxxxxxxxxxxxxxxxxxxxxxx
What version of Word? In Word 2003 and earlier, try Tools - Templates and Add-ins - Attach. After specifying the desired template, tick Automatically update document styles.

--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com


<tester> wrote in message news:Ov3XOrk1IHA.4772@xxxxxxxxxxxxxxxxxxxxxxx
Is there a way to open a text file and have it pick up the default fonts and page settings? It always opens in word in courier font, whereas my default font is times new roman.

Or would there be a way to run word from a command line, passing in the template I want to use and the file I want to open.



.



Relevant Pages

  • Re: Change how Word formats a .txt file
    ... Thank you for the macro solution - with your help I was able to ... When I display the formatting characters, the paragraph mark is at the ... Is there a way to change how Word opens and formats a .txt file? ...
    (microsoft.public.word.newusers)
  • Re: Document not opening though Word is
    ... WordPad can read RTF, but you said that you lost some formatting that way. ... I guess you got lucky, or perhaps there's some particular formatting that Word isn't handling correctly -- when writing, reading, or both. ... It should prompt you to indicate the file type. ... > All produce the same result (Word opens, ...
    (microsoft.public.word.application.errors)
  • Re: Retaining formats
    ... Or you could build that macro that opens the file and formats it the way you ... final file name, exit excel. ... "grok" wrote: ... losing your formatting. ...
    (microsoft.public.excel.misc)
  • Re: redefine Normal style in Word 2004
    ... There is a specific exception hard-coded for "Normal Template". ... formatting in any document they opened, ... If the font has been overridden in the incoming text by Direct ... > "What happens when Word opens a document? ...
    (microsoft.public.mac.office.word)
  • Re: activeworkbook.saveas - saving format changes
    ... > I have a WSH script that opens a csv file and loads it ... > excel I have lost all the formatting changes. ... > Sub createMpetReport() ...
    (microsoft.public.excel.programming)