Re: Save Word Doc as ASCII Text and set line width?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




"djconner" <djconner@xxxxxxxxx> wrote in message news:1176832049.612954.206480@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have a VBA/Microsoft Access program that generates a document in
Word 2000. My new requirement is that I need to then save the
document in ASCII text with a maximum line width of 69 characters.

I think I have the first part covered, and in terms of formatting it's
fairly simple already, but I'm not sure how to go about setting that
69-character line width.

A side issue, in case anybody knows... Can accented characters be
used in an ASCII text document, and if so, how? Specifically, this
character: É as used in the capitalized word "ATTACHÉ". Currently
when doing a SaveAs to wdFormatDOSTextLineBreaks, that character turns
into a garbage character.


Hi djconnor

The key to setting the line length to 69 characters is to proceed as follows before you save the document.

1. Format all text in the document using a fixed-width font such as Courier New and with a common font size

2. Adjust the margins so that the line width accommodates no more than 69 characters

To get the accented E to appear OK in the text file, save as wdFormatTextLineBreaks, not as wdFormatDOSTextLineBreaks.



--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

.



Relevant Pages

  • Re: File-Compare "fc" falsely reports mismatch between identical files
    ... first and last lines of each set of differences, whereas /L is said to compare files as ascii text. ... Show me a couple of "text files" that fc/a does not compare properly, and I would argue that they are so extreme in some way that I would not consider them "text files". ... One of the definitions found by google is this: "A file that contains characters organized into one or more lines. ... the tax department reacted to a customer's complaint and insisted that the faulty tax calculation be fixed. ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: POS. Cash Register on AS400.- New and Updates
    ... Probably the easiest way would be to send them as ASCII. ... You need to change the printer file to not convert unprintable characters. ... "The INITPRT tag defines the ASCII control ... but still can not open cash drawer. ...
    (comp.sys.ibm.as400.misc)
  • Re: Unicode Support
    ... consider:)...but, you know, a file is still just a "stream of characters" ... "escape sequence" but accessing an ordinary ASCII character) are considered ... English, while all your identifiers are in "Romanji" Japanese or something ... NASM appears already to do so with strings and comments in ...
    (alt.lang.asm)
  • Re: System 360 EBCDIC vs. ASCII
    ... I suppose they could have created a 7-bit architecture if it ... There are a few vestiges of 7-bit characters in other computer systems due ... If you set your modem to 8 bits you ... connections, including hardwired ones: plotters, ASCII terminals, etc. ...
    (bit.listserv.ibm-main)
  • Re: File-Compare "fc" falsely reports mismatch between identical files
    ... compare files as ascii text. ... to two different printers and produced different results. ... the definitions found by google is this: "A file that contains characters ... calculated tax payable - for a period of six years. ...
    (microsoft.public.win2000.cmdprompt.admin)