prevent txt file from opening as html?

M

MsOsWin

I have a small txt file that contains snippets of web pages (to study). I know the file is txt because it was born in a text editor. :)
When opening in word 2000, Word seems to 'sniff out' some of the tags, and decide the file is html. The result looks a bit funny;
a mix of exposed and unexposed tags :)

But the problem is this means I can't use my word macros to work with the file.

Any setting somewhere to force Word to open txt as txt? Or, for each time this may happen (obviously very rarely), do I have to
"switch to raw html mode"?

Btw, another txt file with same the first lines (not resembling html at all) opens properly as txt.
 
P

PopS

Hi,

I was going to set f'ups, but I'm not sure a couple of
those groups might not be good sources. FWIW, I've
noticed that a lot of folk in the .public.word.newusers
also frquent this group, and there are probably others
I'm not aware of. Usually someone posting here will
get a response, if anyone knows the answer/s, that is.

See more inline:


I have a small txt file that contains snippets of web
pages (to study). I know the file is txt because it
was born in a text editor. :)

===> Which text editor, and how was the info in it
concieved; paste, manually written, downloaded via IE,
etc.. Lots of ways to do it, and one can get differing
results.
When opening in word 2000, Word seems to 'sniff out'
some of the tags, and decide the file is html. The
result looks a bit funny;
a mix of exposed and unexposed tags :)
===> Is Word doing conversions when it opens these
files? Maybe setting it to confirm or ask permission
before converting a file would help here.
Depending on how the data gets into the txt file,
perhaps it's only getting some but not all of the tags?
That's why I asked about how it was ''conceived" above.
But the problem is this means I can't use my word
macros to work with the file.
===> Can you give an example of why the macros won't
work? What goes wrong?
Perhaps, if it's simple enough pastes, you could
filter out the problems tags? If that's the problem, I
mean.
Any setting somewhere to force Word to open txt as
txt? Or, for each time this may happen (obviously
very rarely), do I have to
"switch to raw html mode"?
===> Here is where turning off or at least making Word
ask before converting a document may well help.
In Word 2002 and earlier that setting is at Tools;
Options; the General Tab and tick "Confirm Conversions
at Open". Then if you open a .txt but windows wants to
render html, you can tell it not to.
Btw, another txt file with same the first lines (not
resembling html at all) opens properly as txt.

===> I don't mind reasonable cross-posting and most
other reasonable people don't. It's the multi-posters
that get the flames, it seems. You should, however,
set f'ups so the info from all the groups wll end up in
one place for you (and others interested) to read.
Makes it a lot more convenient and still reaches all
the groups once you've made the first post or two.

HTH,

Pop
 
M

MsOsWin

PopS said:
Hi,

I was going to set f'ups, but I'm not sure a couple of
those groups might not be good sources. FWIW, I've
noticed that a lot of folk in the .public.word.newusers
also frquent this group,

ah, the affinity group complication. :)
and there are probably others
I'm not aware of. Usually someone posting here will
get a response, if anyone knows the answer/s, that is.



===> Which text editor,

editpadlite, which as far as i can find in options has no unix lf-less etc settings.

i've used editpadlite for years, and it always produces standard "DOS" txt files as far as word or notepad opening editpadlite's
txt files. (metapad is more puzzling in this regard)
and how was the info in it concieved; paste, manually written,

just those two.
mostly manually typed, plus paste-lets from View Source in mozilla (colored text that pastes as txt in editpadlite)
downloaded via IE,
etc.. Lots of ways to do it, and one can get differing
results.
snip

===> Is Word doing conversions when it opens these
files? Maybe setting it to confirm or ask permission
before converting a file would help here.

at times when i'm looking at "weird" files on the hard disc, Word will sometimes ask me to pick which among many text-like files.
often this dialog's radio dot has pre-chosen "utf-8". I mentoin this in context of today's misrecognized txt file , because none of
those Word open-as dialogs popup when opening *many* other editpadlite created txt files.
(i believe the other dialog -- for opening wordperfect, word 2, etc formats -- emanates from the converter add-ons?)
Depending on how the data gets into the txt file,
perhaps it's only getting some but not all of the tags?
That's why I asked about how it was ''conceived" above.

yes, it looks as if Word is being ridiculously forgiving about "sloppy html". there;s very little html in the file.
===> Can you give an example of why the macros won't
work? What goes wrong?

ah, i meant that i'd like word to properly open the file as txt, so i can work on the file using my handydandy Word macros. i
imagine the macros *would work* just fine, but
1 some of the text which Word has selectively recognized as HTML, is now "hidden" from me.
2 Word would probably force the Save to save as html and thereby *add* little piles of bizarre tagging throughout what
had originally been a txt file.

(i long ago gave up using word for any html.)

Perhaps, if it's simple enough pastes, you could
filter out the problems tags? If that's the problem, I
mean.

situation is otherwise. :) i'm trying to work with regex, which acts weird in editpadlite, because some parts of editpadlite uses
(it's own?) regex.
===> Here is where turning off or at least making Word
ask before converting a document may well help.
In Word 2002 and earlier that setting is at Tools;
Options; the General Tab and tick "Confirm Conversions
at Open". Then if you open a .txt but windows wants to
render html, you can tell it not to.

will try (after restart, because this computer's been running for hours. else, memory will probably floop if i start Word now)
snip

===> I don't mind reasonable cross-posting and most
other reasonable people don't. It's the multi-posters
that get the flames, it seems. You should, however,
set f'ups so the info from all the groups wll end up in
one place for you (and others interested) to read.
Makes it a lot more convenient and still reaches all
the groups once you've made the first post or two.

yes.. the concept is good, but i can imagine most people would not hunt down the followups, in groups they never visits, to
add later response. still, i'll transition to the busy group :)

um, even weaker, the "excess" groups still have to be manually trimmed in the even later replies, if i assume correctly.
thanks for your reply.
 
B

Bob Buckland ?:-\)

In Tools=>Options=>General turn on the
[x] Confirm conversions at open
choice to have Word let you choose an
installed converter when the file is not
a .doc file type.

=======

I have a small txt file that contains snippets of web pages (to study). I know the file is txt because it was born in a text editor.
:)
When opening in word 2000, Word seems to 'sniff out' some of the tags, and decide the file is html. The result looks a bit funny;
a mix of exposed and unexposed tags :)

But the problem is this means I can't use my word macros to work with the file.

Any setting somewhere to force Word to open txt as txt? Or, for each time this may happen (obviously very rarely), do I have to
"switch to raw html mode"?

Btw, another txt file with same the first lines (not resembling html at all) opens properly as txt. >>
--
Let us know if this helped you,

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*

For Everyday MS Office tips to "use right away" -
http://microsoft.com/events/series/administrativetipsandtricks.mspx
 

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