Reply
 
Thread Tools Display Modes
  #1   Report Post  
 
Posts: n/a
Default prevent txt file from opening as html?


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.

--
two of these groups seem pertinent, but are ghost towns, so i also x-post to the heavily used group.
  #2   Report Post  
PopS
 
Posts: n/a
Default

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:


wrote in message
...

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.

--
two of these groups seem pertinent, but are ghost
towns, so i also x-post to the heavily used group.


=== 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


  #3   Report Post  
 
Posts: n/a
Default

"PopS" in :

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.



wrote in message
...

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,


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.

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?


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.

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.


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

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


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.


Pop

  #4   Report Post  
Bob Buckland ?:-\)
 
Posts: n/a
Default

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.

=======
wrote in message ...

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/a...andtricks.mspx



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word crashes while opening .doc file Rachelle Read Microsoft Word Help 1 July 18th 05 02:53 PM
Opening a file opens an extra file Bob Stringer New Users 0 July 17th 05 06:02 PM
File opening read-only & file locked by XXX user prompt laralea Microsoft Word Help 2 June 30th 05 02:55 PM
Setup for curser location when opening a file Greg Microsoft Word Help 1 May 28th 05 04:35 PM
How to creat relative and shorthand file path names? 2dogs Microsoft Word Help 1 May 15th 05 12:11 PM


All times are GMT +1. The time now is 02:53 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"