Document Management

  • Thread starter Thread starter Gulliver
  • Start date Start date
G

Gulliver

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.
 
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,
 
Back
Top