TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
onez
NA
73
0
StreamWriter Encoding & MS Word
Oct 13 2004 4:54 AM
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();
Reply
Answers (
1
)
Mobile headache
initialize class once