471,354 Members | 2,075 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

Read Formated Text From MS Word

I Use the following code to read from MS Word, but I couldent read Formated
Text (RTF).
How Can I read formated text from MS Word Doc without using clipboard.
thanks.

Word.ApplicationClass WordApp = new Word.ApplicationClass();
.....
// Let's get the content from the document
Word.Paragraphs DocPar = Doc.Paragraphs;
// Count number of paragraphs in the file
long parCount = DocPar.Count;
// step through the paragraphs
while (i < parCount)
{
i++;
t1 = ImputDocPar[i].Range.Text;
}
Jan 6 '06 #1
3 5236
sb_Luis,

What happens when you do this? Do you get an exception? It's hard to
say what the issue is without knowing what is wrong.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"sb Luis" <sb******@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I Use the following code to read from MS Word, but I couldent read Formated
Text (RTF).
How Can I read formated text from MS Word Doc without using clipboard.
thanks.

Word.ApplicationClass WordApp = new Word.ApplicationClass();
.....
// Let's get the content from the document
Word.Paragraphs DocPar = Doc.Paragraphs;
// Count number of paragraphs in the file
long parCount = DocPar.Count;
// step through the paragraphs
while (i < parCount)
{
i++;
t1 = ImputDocPar[i].Range.Text;
}

Jan 6 '06 #2
Hi
There is no error with this code, but the result is a plain text, not a
formated text. I want RTF of each paragraph in MS Word.
Luis.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:ur**************@TK2MSFTNGP15.phx.gbl...
sb_Luis,

What happens when you do this? Do you get an exception? It's hard to
say what the issue is without knowing what is wrong.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"sb Luis" <sb******@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I Use the following code to read from MS Word, but I couldent read
Formated Text (RTF).
How Can I read formated text from MS Word Doc without using clipboard.
thanks.

Word.ApplicationClass WordApp = new Word.ApplicationClass();
.....
// Let's get the content from the document
Word.Paragraphs DocPar = Doc.Paragraphs;
// Count number of paragraphs in the file
long parCount = DocPar.Count;
// step through the paragraphs
while (i < parCount)
{
i++;
t1 = ImputDocPar[i].Range.Text;
}


Jan 6 '06 #3
Luis,

Your code doesn't show anything that is specific to processing RTF or
HTML code. Can you post the code you are using to load and save the
document?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"sb Luis" <sb******@yahoo.com> wrote in message
news:eQ**************@TK2MSFTNGP09.phx.gbl...
Hi
There is no error with this code, but the result is a plain text, not a
formated text. I want RTF of each paragraph in MS Word.
Luis.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:ur**************@TK2MSFTNGP15.phx.gbl...
sb_Luis,

What happens when you do this? Do you get an exception? It's hard to
say what the issue is without knowing what is wrong.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"sb Luis" <sb******@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I Use the following code to read from MS Word, but I couldent read
Formated Text (RTF).
How Can I read formated text from MS Word Doc without using clipboard.
thanks.

Word.ApplicationClass WordApp = new Word.ApplicationClass();
.....
// Let's get the content from the document
Word.Paragraphs DocPar = Doc.Paragraphs;
// Count number of paragraphs in the file
long parCount = DocPar.Count;
// step through the paragraphs
while (i < parCount)
{
i++;
t1 = ImputDocPar[i].Range.Text;
}



Jan 7 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by lialie | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.