473,240 Members | 1,452 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,240 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 5336
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: John Brock | last post by:
I am currently using a VB.NET program to send out e-mails with plain text bodies (plus one attachment). The emails are being received as Rich Text messages (probably just my personal Outlook...
0
by: Ruby | last post by:
Hi,All I face a problem when i enter a simple text in the existing formated RitchTextBox Control. There is a problem is that i can't enter a simple text in a specific place, it may be after a...
3
by: Jay | last post by:
Hi, I need to read word document file in ASP.net and place it in a text box . How to do it ? i tried : Word.Application app = new Word.ApplicationClass(); object nullobj =...
0
southoz
by: southoz | last post by:
Good ay all , I'm fairly new to access(a little over 5 weeks now). Since I'v started I have picked up a lot of useful information from forums such as this and in doing so will share that information...
3
by: lialie | last post by:
Hi, Is there a fine way to read a formated file like: %HEADER title = "Untilted" username = "User" %DATA ....... ....... The formated file may be very popularly, but the module ConfigPaser
0
by: sajithkahawatta | last post by:
i am new to asp. i want this,it should possible to copy text line from somewhere (like word doc with text format).and paste it on the asp page(in a text area or somewhere). then code to get it from...
0
by: Joeyeti | last post by:
Hi fellow VB knowers (I am but a learner still). I have a question for you which I struggle with. I need to convert nested Lists in MS WORD (whether numbered or bulleted or mixed) from their...
0
by: alivip | last post by:
Is python provide search in parent folder contain sub folders and files for example folder name is cars and sub file is Toyota,Honda and BMW and Toyota contain file name camry and file name corola,...
11
by: alivip | last post by:
how to ingrate my code to read text in in parent folder contain sub folders and files for example folder name is cars and sub file is Toyota,Honda and BMW and Toyota contain file name Camry and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.