Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 249
  • Last Modified:

VB6: Outlook like styl for MsWord document.

Hi,

I have a program to mange a 15,000 MsWord documents (.rtf format)
I have an index of the entire document in MsAccess table. The table fields are: To, Cc, Subject, RefNumber, FileName & Path (path to where the document is store).
My program also has a form ("Archive") with MshFlexgrid displaying the table records (the MsAccess table) and I can double-click on the row to open the document I want…

I would like to make the "Archive" form looks like outlook with a preview-pan (displaying a preview of the MsWord document that curser standing on) and I would like to have a TreeView to show/select/file the documents (the filling is virtual because the real path will not be changed – when I'll select a node it will show all the documents that was filed, virtually, in this "binder").


I don't know where to start with the solution, can sombody help me?

I will double the points for a full and "nice" solution…..

tks !
0
2Angel
Asked:
2Angel
  • 6
  • 5
1 Solution
 
jimbobmcgeeCommented:
Firstly, ditch the FlexGrid and read the data items in to a ListView, with its View (?)  property set to report.  While loading, set the Tag property of each ListItem to the filename.

This will give you the option to have sortable columns and icons (from a paired ImageList control).  You can set the columns you want to display at design time.

Then, if they are Word files, I would implement the Web Browser control, then in the ListView_Click() entry, use it to navigate to ListView.SelectedItem.Tag (the filename).  If Office is installed correctly, the Web Browser will open the Office document
within the control.  Otherwise your going to have to implement the Word Document Object Model and parse each part of the document to a rich text box or an HTML preview file.

As for the TreeView, it really does depend on how you set up your virtual folders.  A nice TreeView tutorial can be found here: http://www.virtualsplat.com/tips/visual-basic-treeview-control.asp.

Alternatively (and this may be a stupid question) but why don't you store your Word documents in an Outlook PST?

HTH

J.
0
 
2AngelAuthor Commented:

Thank you for your comment.

At first I used a ListView but with 15,000 documents(!) - its taks forever....!

I'll give it a try with the browser and I'll let you know...

About the Outlook PST - I like it but I don't know how to do it....


Regards & tks
0
 
jimbobmcgeeCommented:
For PST, it's easy -- In Outlook, go File -> New -> Outlook Data File.  Choose PST and enter a name.  Now you can create mail folders in the tree and drag Word docs from Explorer to Outlook -- instant Outlook-style document library.

ListView would take a long time, adding each row instead of a direct data access, but much more flexible.

J.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
2AngelAuthor Commented:

tks again.

Droping Word docs from Exlorer to outlook its nice but it's but its dosn't make a preview of the document...

0
 
jimbobmcgeeCommented:
Best I can suggest then is to use the web-browser control to view your RTF files -- you really don't want to have to parse the RTF format yourself...

J.
0
 
jimbobmcgeeCommented:
Saying that, do you have the Microsoft Rich TextBox control in your components list (right-click toolbar -> components).  If so, tick it and use the LoadFile method.  If not, try to find it online -- its called RICHTX32.OCX.

An example (using ListView, as I'm familiar with it -- I expect FlexGrid works similarly):

    Private Sub ListView1_Click

        RichTextBox1.LoadFile(ListView1.SelectedItem.Tag)

    End Sub

That should do it...

J.
0
 
2AngelAuthor Commented:
Hi,

Thank you for trying to help me.

It does work with the browser but its not working "nice" - it is slow and not smoth...

I am looking for more profesional solution and more like in the outlook.

Do have any other idea?

Thanks....
0
 
jimbobmcgeeCommented:
How did the RichTextBox control pan out?

J.
0
 
jimbobmcgeeCommented:
BTW, you can get the RichTextBox control from http://www.ascentive.com/support/new/images/lib/RICHTX32.OCX, if you don't already have it...

J.
0
 
2AngelAuthor Commented:
jimbobcgee: Hi,

Thank you very much for your comments.
I am sorry for not writing to you so long, I had some other assigments...

I tried the RichTextBox (I had it alredy) but its no good for me because my rtf files are protected and locked by password (they are not pure rtf - they are doc files... ) so its a problem to open them without using MsWord (which taking time to run). i've tried to open them without the passwords but still its showing all the "tags" and "rubish"...

So, do you have anything more for me...???

Thanks again!
0
 
2AngelAuthor Commented:
Hi,

At the end I am using it.... so, the points are yours!

BTW: I am using the browser to "preview" some other files but I have some problem with it. Take a look at this Q:
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_21397984.html
Any idea?
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now