View Single Post
  #10   Report Post  
Kenneth
 
Posts: n/a
Default

On Tue, 10 May 2005 22:09:28 +0200, "Klaus Linke"
wrote:

Hi Kenneth,

I'd like to take a step back, because I'm still not sure what you are trying to do.
The (recoded) macro you posted in the other thread contained "InsertFile".
I don't see how you can specify the encoding for "InsertFile", either.

Here, you're talking about "File Open", where you can specify the encoding.
But I'm not sure why you'd need to (either opening or inserting a text file).

As far as I understood, you're saving the text files yourself.
If you use "Plain text" (= Windows text) for saving the text file, you shouldn't need to specify any encoding when you re-open or insert the file.
And if the "Confirm conversions" dialog (in "File Open" or "Insert File") bothers you, you should be able to turn that off.

In this thread, you said that the "Confirm conversion" dialog comes up. Did you uncheck the option in "Tools General" and it still comes up? Then maybe that's the bug that might be solved by the hotfix from http://support.microsoft.com/kb/817140
(Can't say for sure because I've never run into this bug)

In the other thread, you said that some characters change into blanks if you re-open the text file.
Are you sure those characters *can* be saved in a Windows plain text file? Which characters are turned into blanks?

Regards,
Klaus



"Kenneth" schrieb im Newsbeitrag ...
On Tue, 10 May 2005 20:33:26 +0200, "Klaus Linke"
wrote:



"Kenneth" wrote:
On Tue, 10 May 2005 10:03:42 -0700, "Bob Buckland ?:-\)"
75214.226(At Beautiful Downtown)compuserve.com wrote:

Hi Kenneth,

This article may help:
http://support.microsoft.com/default...us;256060&FR=1

========
"Kenneth" wrote in message ...

Howdy,

When I open a TXT file in Word 2000 (or insert a TXT file in
another open DOC) a dialog opens asking how I want the
characters in the file converted.

How can I set the default to a particular conversion so that
the dialog does not open each time?

Sincere thanks,

Kenneth

Hi Bob,

I appreciate your response, but...

I had found that article on my own. I made the registry
modification as described, re-booted, but still had the
problem.

Do you know if there was something beyond the reg hack that
I was to have done?

Thanks again,
--
Kenneth

If you email... Please remove the "SPAMLESS."


Hi Kenneth,

You must have seen a different KB article. And I don't think there is a registry setting for a default "open" encoding, since such a default setting would be a terrible idea.

You can use a macro to open text files using the specific encoding you want (maybe using some more sophisticated macro than the one from the KB article, which lets you specify the file using the "File Open" dialog).

You can even replace the "File Open" dialog with your sophisticated macro (though I wouldn't do that).

You can't set a default encoding for text files. The default in Windows apps is the Windows code page, or Unicode.
Either you let Word guess (with "confirm conversions" turned off), which will work for Windows text files and Unicode text files, or you'll have to specify the encoding (manually or by writing a macro).

Regards,
Klaus


Hi Klaus,

It is only for TXT files that I would like to set a default
encoding.

Is there a way to do that?

Or, if I wish to have Word "guess", is there a way to have
it do that?

Thanks again,
--
Kenneth

If you email... Please remove the "SPAMLESS."


Hi Kenneth,

I'd like to take a step back, because I'm still not sure what you are trying to do.
The (recoded) macro you posted in the other thread contained "InsertFile".
I don't see how you can specify the encoding for "InsertFile", either.

Here, you're talking about "File Open", where you can specify the encoding.
But I'm not sure why you'd need to (either opening or inserting a text file).

As far as I understood, you're saving the text files yourself.
If you use "Plain text" (= Windows text) for saving the text file, you shouldn't need to specify any encoding when you re-open or insert the file.
And if the "Confirm conversions" dialog (in "File Open" or "Insert File") bothers you, you should be able to turn that off.

In this thread, you said that the "Confirm conversion" dialog comes up. Did you uncheck the option in "Tools General" and it still comes up? Then maybe that's the bug that might be solved by the hotfix from http://support.microsoft.com/kb/817140
(Can't say for sure because I've never run into this bug)

In the other thread, you said that some characters change into blanks if you re-open the text file.
Are you sure those characters *can* be saved in a Windows plain text file? Which characters are turned into blanks?

Regards,
Klaus


Hi Klaus,

My apologies for any confusion...

Let's start with the macro that I posted:

I recorded those two macros only so that I could see the
code that might do what I needed. Other than that, the
macros are of no significance.

So, let me describe again what it is that I am trying to do:

I have a TXT file. (It happens that the file is written by
my database, but, as with the issue of the macros, I believe
that to be of no relevance here.)

If I launch Word 2000 and try to open the TXT file (or if I
open a new DOC and attempt to insert the TXT file) a dialog
opens in Word that asks how I want the TXT file converted.

I want to prevent that from happening, that is, I would like
to set a default in Word, to open all TXT files with a
particular conversion rather than choosing each time.

Now, it happens that I want that not merely to avoid having
to make the selection. I have a Word macro that formats and
prints the TXT file in a certain way and when the macro
runs, the conversion dialog stops it. It would appear that
the problem could be solved either by having the default
that I described, or by inserting something in the macro
that would tell Word (in effect) Open the TXT file converted
as "Plain Text."

In addition, there might be other approaches, but either of
those above would give me what I need.

Sincere thanks once again,
--
Kenneth

If you email... Please remove the "SPAMLESS."