Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word 2000 - "Encoding" prompt when reading .txt file

Status
Not open for further replies.

AndrewMozley

Programmer
Oct 15, 2005
621
GB
I have an old application which produces reports as .txt files which I then wish to read using WORD.

The command which I use is winword myfile.txt

With Word 2003 and Word 2007 this works fine. However I have some users who are running Word 2000. In their case, as soon as WORD fires up it shows a dialogue window inviting the user to select what encoding he wishes to use - a long list, including Ukrainian and no doubt lots of other languages. It also shows a thumbnail sketch of the text itself. The user can then select the encoding and he is in business.

I would like to omit this dialogue (Word 2003 and Word 2007 seem quite happy to choose a reasonable default).

How can I do that? Is there an option on the command line, or possibly a set-up option.

The problem does not always occur even with Word 2000. With some text files - possibly longer files - although I cannot really detect a pattern - Word seems happy to go ahead without invoking its dialog box.

Thanks. Andrew
 
Hi Andrew,

The problem is most likely caused by one or more of the first few characters in the file. You might try running Word with the /safe or /a switch to see if that makes any difference,

Cheers
Paul Edstein
[MS MVP - Word]
 
Thanks, Paul.

You have put me on the right track.

In fact after further investigation, what Word 2000 gets confused by is the sterling £ sign in the text - whether at the start of the document or anywhere in the text. If I remove these occurrences then Winword 2000 opens without prompting me.

I have tried the /A and /safe options but I get no joy.

I suppose I could parse the text in my original application and substitute some other character, but that might be confusing . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top