Opening with specific encoding

G

George Merriman

I have a file with DOS-encoded text. If I use Word 2000 to open it manually,
I first get the Format dialog, and when I open with encoded text, I get a
second dialog which allows me to select the Western European (DOS) encoding,
and the file opens in the form I want.

I am trying to get this to work with automation from C#. If I take all of
the defaults for the Document.OPen call I get the initial Format dialog, but
when I select Encoded Text the file opens with what looks like Japanese
encoding without displaying the second encoding dialog box for selecting the
particular encoding.

What I really want is to be able to get the document to open and display
with the appropriate encoding with no user intervention. I would settle for
being able to give the user the chance to select the format and/or encoding
manually if that is all I can get.

I've fooled around with the format and encoding parameters for the Open
call, but if I supply anything but objMissing the Word instance stalls
before displaying the document.

Any ideas?
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?R2VvcmdlIE1lcnJpbWFu?=,

Have you seen KB article

The File Conversion Encoding dialog box appears when you open a text file
http://support.microsoft.com/default.aspx?scid=KB;EN-US;290981
For a Microsoft Word 2000 version of this article, see
817140.
I have a file with DOS-encoded text. If I use Word 2000 to open it manually,
I first get the Format dialog, and when I open with encoded text, I get a
second dialog which allows me to select the Western European (DOS) encoding,
and the file opens in the form I want.

I am trying to get this to work with automation from C#. If I take all of
the defaults for the Document.OPen call I get the initial Format dialog, but
when I select Encoded Text the file opens with what looks like Japanese
encoding without displaying the second encoding dialog box for selecting the
particular encoding.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

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