Insert Text From File Font

G

Gene

I am attempting to create a simple file to reformat .txt files for
publication as .pdfs in Word 2007. The file has the proper layout, margins,
borders and footer; all that remains is to insert the text before saving. I
have modified fonts to Lucida Console. I have modified styles (Normal, No
Spacing, Plain Text, Default Paragraph) to Lucida Console, 8.5 pt. I have
saved the fonts and my style set and my theme.

When I insert text from file, I get Courier New, 10.5 pt.

I know I can Select All and change font or pick a style after insertion, but
is there a way to preset the insertion style?
 
J

jomilli

Gene,
I get the same results when opening Word 2007 with another program who's
output is .txt file. Eventhough I have changed the default "Normal.dotm" to
the settings I prefer the results stay as courier new 10.5 with tabs at 1"
each. My default normal.dotm is courier new 10 with tabs at .5 left and
right. This is how we had to do it in all other Word versions but doesnt work
the same way in 2007. This version template says macro enabled. I suppose it
means everytime Word2007 opens it runs a macro to set the defaults?
 
G

Gene

Thanks for the info ... at least I know that someone else has seen this; and
thanks for the tip on macros - it's something to research. I'm wandering into
new territory here - does anybody have any suggestions?
 
G

Graham Mayor

While you can set the default plain text style in the normal.dotm template,
Word will ignore the changes when you open a text document, unless you force
it to use the settings you have created. The following macro in normal.dotm
will do that

Sub AutoOpen()
If LCase(Right(ActiveDocument.name, 3)) = "txt" Then
With Selection
.WholeStory
.Font.Reset
.HomeKey Unit:=wdStory
End With
End If
End Sub

or you could simply set your preferences in the macro and forget about the
style eg

Sub Autoopen()
If LCase(Right(ActiveDocument.name, 3)) = "txt" Then
With Selection
.WholeStory
.Font.Name = "Verdana"
.Font.Size = 14
.HomeKey Unit:=wdStory
End With
End If
End Sub

will set the font to 14 point Verdana

See http://www.gmayor.com/installing_macro.htm


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Gene

Graham (and jomilli):

Thank you (both) for a direct and thorough solution.

Respectfully,
Gene.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top