StreamWriter Encoding & MS Word
I cannot install the primary interop assemblies to manipulate word files becuase I have Office XP for Students instead of Pro. I think, MS won't give me an answer?
I want to append data to word document. I can do so in Plain Text Format. However, I cannot format the file in any way such as bold or highlight without converting the file into an unwritable format. Is there a way to write to a word file? Encoding option for this or way around?
FileStream fs = new FileStream(fileName,
FileMode.Create, FileAccess.Write, FileShare.None);
string strText = "jlkjlkjlkji";
StreamWriter swFromFileStreamDefaultEnc =
new System.IO.StreamWriter(fs,
System.Text.Encoding.Unicode);
swFromFileStreamDefaultEnc.Write(strText);
swFromFileStreamDefaultEnc.Flush();
swFromFileStreamDefaultEnc.Close();