Re: Change how Word formats a .txt file



You are welcome :)

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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

geekgrrl wrote:
Graham,

Wow! Thank you for the macro solution - with your help I was able to
get Word to format the .TXT file the way I wanted it upon opening.
With the macro in place I could use my conversion tool to create TIFF
files from all my mainframe text files.

Thanks again so much. You're a life saver.
Sheri.


Graham Mayor wrote:
I have had a look at the document you sent me. There is nothing
amiss with that and if you open it in Word, provided there is enough
space between the margins it will wrap correctly. I have posted a
macro solution to you that will do just that.

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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

geekgrrl wrote:
Graham,

Thanks for the reply.

When I display the formatting characters, the paragraph mark is at
the end of the line, not where Word wraps the text, so I don't
think it is the mainframe output.

The text file is 134 chars wide with paragraph markers at the end of
each line where I want them. If I load the .txt file, change my
Plain Text style to Courier 8pt and default my page setup to be
Letter Landscape with T/L/R/B margins of 0.5", my mainframe page
displays correctly. I save my style change, and make my current
page setup the default, and close Word. If I open the same file
again by double-clicking on it,or throught File-Open the margins are
automatically adjusted to 2.83" L/R and the file is wrapped.

I can send you the file to look at. I'll send it from your website.

Thanks in advance for your help.
Sheri


Graham Mayor wrote:
This is not normal behaviour. Word will wrap the text to the
current margins. If the wrap is fixed at 80 characters then there
is a hard return at 80 characters. You can establish this by
pressing SHIFT+* to display the formatting characters.There will
only be a paragraph mark at the end of each true line. If there
are more paragraph marks then you should check your mainframe
output as it appears to be wrapping at 80 characters.

If you want to send me one of your documents to check, then do so
to the link on my web site.

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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

geekgrrl wrote:
Terry,

Thanks for the answer. Normally Word does wrap my text for me.
The problem here seems to be how Word treats plain text
(unformatted) files. Whenever I open a plain text file Word
wants to wrap it at 80 characters, no matter what my page layout
is. My text file is actually 134 characters wide as it comes
from mainframe. You could duplicatate this by creating a text
file in notepad that is greater than 80 characters wide and
seeing what happens when you double-click to open that txt file
in Word. My file does have the extension .txt and not .doc.

Thanks again,
Sheri

Terry Farrell wrote:
That seems weird and not my experience with Word. Word should
wrap your text automatically: there should be no need to mess
around with margins, orientation or fonts. Are you sure that you
haven't enabled the Wrap to Windows option?

--
Terry Farrell - MS Word MVP

"geekgrrl" <geekgrrl71@xxxxxxxxxxx> wrote in message
news:1167768596.825201.261140@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,

I am trying to open a .txt file in Word. The .txt file was
created on a mainframe and can be up to 134 characters wide. Is
there no way that I can get this document to display properly
upon opening?

If I open the document, change the font used for Plain Text
style to be Courier New 8 point instead of Courier New 10
point, and change the page layout to Letter Landscape, my
mainframe txt file fits on the page.

I can change (and have changed) the Plain Text style to always
be Courier New 8 point, and change my Normal.dot to have all my
documents automatically open in Letter Landscape with 1"
margins. This does not work when I open a .txt file using Word.
It formats the plain text as if it was letter portrait and
places it smack in the middle of my Letter Landscape page
(basically increasing the L/R margins from 1" to
2.17")

Is there a way to change how Word opens and formats a .txt file?
Without having to run extra macros and whatnot? I have a tool
that creates TIFF files by automating the opening and printing
txt files using Word to a special virtual printer, and if I can
get Word to open the .txt file in the format/layout I need then
I can use my tool to automatically convert my (many) txt files
to the TIFF files I need.

Thanks,
Sheri


.



Relevant Pages

  • Re: Word closing down
    ... Graham Mayor - Word MVP ... Word MVP web site http://word.mvps.org ... emptied the Template folder (including the subfolders Document Themes ...
    (microsoft.public.word.docmanagement)
  • Re: Run one macro from another and edit filenames for PDF printing
    ... Graham Mayor - Word MVP ... Word MVP web site http://word.mvps.org ... screenshot of how you have your PDF driver setup? ...
    (microsoft.public.word.vba.general)
  • Re: spell check error
    ... Graham Mayor - Word MVP ... Word MVP web site http://word.mvps.org ... spelling errors in this document only" box | OK. ...
    (microsoft.public.word.docmanagement)
  • Re: Macros to add a row in a word table
    ... Graham Mayor - Word MVP ... Word MVP web site http://word.mvps.org ... from the cell in which the Word formula field is placed. ...
    (microsoft.public.word.vba.general)
  • Re: Word closing down
    ... Graham Mayor - Word MVP ... Word MVP web site http://word.mvps.org ... By opening without templates, I ...
    (microsoft.public.word.docmanagement)