Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C#4.0
when i try to open text in Microsoft Office Word is displays error message - file conversion, select the encoding that makes your doument readable ??help please how do i disable error message
Posted 6-Mar-12 16:32pm
SAKryukov at 7-Mar-12 2:10am
Do you think if you disable the error message, the error will be fixed? Sure, always kill messengers delivering bad new; and you will get only the good ones. :-)
SAKryukov at 7-Mar-12 2:11am
And how about some code sample?
thanhtina8 at 7-Mar-12 8:22am
Code is used for Encrypt file word(doc).
public void encrypt ()
TripleDESCryptoServiceProvider tdes = null;
string filename=@"C:\\test.doc"
string encContent = @"C:\\encrypttest.doc";
FileStream fin = new FileStream(fileName, FileMode.Open, FileAccess.Read);
FileStream fout = new FileStream(encContent, FileMode.OpenOrCreate, FileAccess.Write);
byte[] buff = new byte[10000];
int lenread;
tdes = new TripleDESCryptoServiceProvider();
CryptoStream encStream = new CryptoStream(fout, tdes.CreateEncryptor(), CryptoStreamMode.Write);
Console.WriteLine("\nEncrypting content ... ");
while ((lenread = fin.Read(buff, 0, 10000)) > 0)
encStream.Write(buff, 0, lenread);
catch (Exception)
After file "encryptest.doc" is created.I open "crypttest.doc" in Word.Word display message "File conversion, select the encoding that makes your doument readable.Text encoding:".help please how do i disable or skip error message

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 6,649
1 Sergey Alexandrovich Kryukov 6,280
2 CPallini 5,230
3 George Jonsson 3,574
4 Gihan Liyanage 2,522

Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 6 Mar 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100