?
Solved

VB6: Outlook like styl for MsWord document.

Posted on 2005-03-22
11
Medium Priority
?
244 Views
Last Modified: 2010-05-02
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
Comment
Question by:2Angel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 16

Expert Comment

by:jimbobmcgee
ID: 13602095
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
 
LVL 2

Author Comment

by:2Angel
ID: 13602460

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
 
LVL 16

Expert Comment

by:jimbobmcgee
ID: 13603326
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:2Angel
ID: 13603479

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
 
LVL 16

Accepted Solution

by:
jimbobmcgee earned 375 total points
ID: 13607229
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
 
LVL 16

Expert Comment

by:jimbobmcgee
ID: 13607278
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
 
LVL 2

Author Comment

by:2Angel
ID: 13625515
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
 
LVL 16

Expert Comment

by:jimbobmcgee
ID: 13651788
How did the RichTextBox control pan out?

J.
0
 
LVL 16

Expert Comment

by:jimbobmcgee
ID: 13651802
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
 
LVL 2

Author Comment

by:2Angel
ID: 13717750
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
 
LVL 2

Author Comment

by:2Angel
ID: 13879217
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

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month14 days, 9 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question