By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,288 Members | 1,243 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,288 IT Pros & Developers. It's quick & easy.

Document Management

P: n/a
Gurus please help! Using VB.net I would like to do the following:

1. Open up a doc or rtf file in my application
2. Search through the text using keywords
3. Select portions of the text by highlighting it
4. Transfer the portions of the text that I've selected into a new window
which will be a blank document
5. The new document will have a reference to the source document (document
name, line number) then the text that was selected
6. I can then open up a new document and do the same as #2,3 and 4; and the
areas that I've selected can be added to the new document in #5.
7. I will then have a number of portions of text copied and referenced from
multiple documents all arranged into one document which i can then print and
save.

Any suggestions?

Thanks.

Gull.
Gurus please help! Using VB.net I would like to do the following:

1. Open up a doc or rtf file in my application
2. Search through the text using keywords
3. Select portions of the text by highlighting it
4. Transfer the portions of the text that I've selected into a new window
which will be a blank document
5. The new document will have a reference to the source document (document
name, line number) then the text that was selected
6. I can then open up a new document and do the same as #2,3 and 4; and the
areas that I've selected can be added to the new document in #5.
7. I will then have a number of portions of text copied and referenced from
multiple documents all arranged into one document which i can then print and
save.

Any suggestions?

Thanks.

Gull.
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Gulliver,

I hope you don't expect me to write the code for you ... here's where you
need to look for the information you need:
1. Open up a doc or rtf file in my application
the RichTextBox can open and save RTF-Files, have a look at the
LoadFile()/SaveFile()-methods
2. Search through the text using keywords
The Find()-method can search the Text in a RichTextBox. You can also use
Regular Expressions (look at the Regex-Class)
3. Select portions of the text by highlighting it
Properties SelectionStart and SelectionLength as well as SelectedText. Look
at the RichTextBox-Properties starting with "Selection" ...
4. Transfer the portions of the text that I've selected into a new window
which will be a blank document
Copy the SelectedText into the new Document, that should be the easiest
task. You can use SelectedRTF-Property and the AppendText()-Method or use
the Clipboard (RichzTextBox has methods for that).
5. The new document will have a reference to the source document (document
name, line number) then the text that was selected
Nope, it wont - you'll have to implement that yourself. It will only contain
the text.
6. I can then open up a new document and do the same as #2,3 and 4; and the areas that I've selected can be added to the new document in #5.
Since you can copy them from the other RichTextBoxes, that should be no
problem.
7. I will then have a number of portions of text copied and referenced from multiple documents all arranged into one document which i can then print and save.
You can Save the document using SyveFile, of course. Printing is a bit more
work, you'll need to have a look at the PrintDocument class, which is used
for printing - but that's a bit of work.

Any suggestions?


Just one more: Why don't you try to read the Online-Help - it's all in it
:-)).
Regards,

--
Frank Eller [.NET MVP]
www.frankeller.de
..NET Developers Group Munich- www.munichdot.net
Nov 20 '05 #2

P: n/a
Thanks Frank for you tips and ideas! Most appreaciated!

Gulliver

"Frank Eller [MVP]" <we*******@frankeller.de> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi Gulliver,

I hope you don't expect me to write the code for you ... here's where you
need to look for the information you need:
1. Open up a doc or rtf file in my application
the RichTextBox can open and save RTF-Files, have a look at the
LoadFile()/SaveFile()-methods
2. Search through the text using keywords


The Find()-method can search the Text in a RichTextBox. You can also use
Regular Expressions (look at the Regex-Class)
3. Select portions of the text by highlighting it


Properties SelectionStart and SelectionLength as well as SelectedText.

Look at the RichTextBox-Properties starting with "Selection" ...
4. Transfer the portions of the text that I've selected into a new window which will be a blank document
Copy the SelectedText into the new Document, that should be the easiest
task. You can use SelectedRTF-Property and the AppendText()-Method or use
the Clipboard (RichzTextBox has methods for that).
5. The new document will have a reference to the source document (document name, line number) then the text that was selected


Nope, it wont - you'll have to implement that yourself. It will only

contain the text.
6. I can then open up a new document and do the same as #2,3 and 4; and the
areas that I've selected can be added to the new document in #5.


Since you can copy them from the other RichTextBoxes, that should be no
problem.
7. I will then have a number of portions of text copied and referenced

from
multiple documents all arranged into one document which i can then print

and
save.


You can Save the document using SyveFile, of course. Printing is a bit

more work, you'll need to have a look at the PrintDocument class, which is used
for printing - but that's a bit of work.

Any suggestions?


Just one more: Why don't you try to read the Online-Help - it's all in it
:-)).
Regards,

--
Frank Eller [.NET MVP]
www.frankeller.de
.NET Developers Group Munich- www.munichdot.net

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.