ASCII Dos Text

B

Brenda A. Reid

I have a file that is generated from our accounting program and is saved as
an ASCII Dos Text file.

I need to use vba coding that tells Word to open it as an ASCII Dos Text
file. There are two different special characters in the txt file which
separates the fields and ends the records. When Word opens the txt file,
those characters import as just squares with no way to distinguish between
the end fields and the end records.

Brenda
 
H

Helmut Weber

Hi Brenda,

you don't need special code to open a txt-file.

Documents.Add "c:\test\wh.txt"

is all you need.

To find out about the squares, select them and use
this code to find out, what characters they are.

Msgbox Asc(selection.text)

HTH
 
G

Graham Mayor

You *may* find that the old Text with Layout converter, which you can
download from my web site will work (you need to ensure Word > Tools >
Options > General > Confirm conversion at open is checked in order to prompt
you to select that filter).

If that doesn't fix it, can you e-mail me a sample of the output to the link
on my web site so that we can see what we are dealing with.

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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