473,406 Members | 2,849 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,406 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 5342
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.