Word 2003 does not have a Save Word files as "Text Only with Line Breaks"

J

JRWitte

How can I accomplish what we were doing in Word 2000 within Word 2003. We are
using macros to save our documents. The macro does a number of things for us
including using our default save choice in Tools/Options/Save Save Word files
as: Text Only with Line Breaks (*.txt). Word 2003 only has "Text Only (*.txt)
" which does not put in line breaks. The files are for use in an external
data base program and without the line breaks it reads the file as a single
line unless we press enter at the end of each line, which is not very
conducive to typing fast.

Thanks in advance for any assistance that you can provide.

Jim
 
J

Jay Freedman

JRWitte said:
How can I accomplish what we were doing in Word 2000 within Word
2003. We are using macros to save our documents. The macro does a
number of things for us including using our default save choice in
Tools/Options/Save Save Word files as: Text Only with Line Breaks
(*.txt). Word 2003 only has "Text Only (*.txt) " which does not put
in line breaks. The files are for use in an external data base
program and without the line breaks it reads the file as a single
line unless we press enter at the end of each line, which is not very
conducive to typing fast.

Thanks in advance for any assistance that you can provide.

Jim

Well, that's the problem with not poking around in the VBA help -- you don't
learn about all the neat things VBA can do. ;-)

Your macro presumably has a SaveAs command. One of the optional parameters
of that command is InsertLineBreaks. That parameter's default, the value it
gets if you omit it from the command, is False. Include the parameter with a
True value, something like this:

ActiveDocument.SaveAs FileName:="C:\temp\lines.txt",
FileFormat:=wdFormatDOSText, InsertLineBreaks:=True

(That should all be one line, but the posting software will probably break
it into two.)

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
J

JRWitte via OfficeKB.com

Jay said:
How can I accomplish what we were doing in Word 2000 within Word
2003. We are using macros to save our documents. The macro does a
[quoted text clipped - 9 lines]

Well, that's the problem with not poking around in the VBA help -- you don't
learn about all the neat things VBA can do. ;-)

Your macro presumably has a SaveAs command. One of the optional parameters
of that command is InsertLineBreaks. That parameter's default, the value it
gets if you omit it from the command, is False. Include the parameter with a
True value, something like this:

ActiveDocument.SaveAs FileName:="C:\temp\lines.txt",
FileFormat:=wdFormatDOSText, InsertLineBreaks:=True

(That should all be one line, but the posting software will probably break
it into two.)

Jay,

Thank you very much for your Prompt & Accurate response to my post.

It worked perfectly, just as you had indicated. You saved me a LOT of grief
and aggravation.

Thanks!!!!!

Jim
 

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