Link to home
Start Free TrialLog in
Avatar of 2Angel
2Angel

asked on

VB6 - Sorting 3000 MsWord Documents.

Hi,

I have 3000 MsWord Documents named from 1.rtf to 3000.rtf.
I would like to put the numbers names in Access data base table to trace them. If one of them is missing (let say 1756.rtf - has been deleted... ) to get a MsgBox "The file 1756 is missing".

Any idea?

Thanks,
Angel
ASKER CERTIFIED SOLUTION
Avatar of ADSaunders
ADSaunders

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Or you could import the txt file directlly into Access
Avatar of 2Angel
2Angel

ASKER

Thank you for the quick reply.


Is it possible to put first al the number in the table (I don't know to do it) and then to go over the numbers to check if there is a missing number between MinNumber and MaxNumber?


Thanks again,
Angel
This is the first question that I think I can answer. 2Angel, I have a solution nearly fully developed. It includes a whole vb 6 project with an Access 2000 mdb file. It also has error checking. I'm kind of doing the whole thing for you and don't know if that's what you want; if not, my apologies. However, this is my first chance to give back something to this community and I just really want to. The code will be lengthy so if you'll post your email address I'll send it to you when I'm done. Hopefully you'll have all the references (stuff for OLE DB, ms scripting runtime, microsoft jet--though i'm not sure if i actually need a reference to this one). Anyhow, just thought I'd let you know in case you accepted an answer. I'm not all that worried about points. I would like you to take a look at the solution once I finish it though, if you don't mind.

I have the solution complete 2Angel. You may email me at jbaisden@natcominc.com or jabcsmajor@jam.rr.com

I tried to make it as modular as possible. The database file has 3 fields and 1 table. They should be self explanatory. Here is a list of project references:

Project References:

OLE Automation
Microsoft ActiveX Data objects 2.7 library
Microsoft Jet and replication objects 2.6 library
Microsoft Scripting Runtime

Components:
Microsoft Common Dialog Control 6.0

Like I said earlier, though the points would be nice, I am more interested in you looking at my solution. I took a roundabout way on a few things but the solution works out quite nicely with error handling and code that I think is highly reusable.

Anybody else interested in the code give me an email. I open for constructive criticism. I certainly could use it.
Avatar of 2Angel

ASKER

jbaisden: Thank you very much!!!
I have sent you my e-mail address to your mail......

c u ...........
The email has been sent. I hope it is everything you need. If it lacks anything at all let me know and I will see what I can do. I have put in comments so as to let you know exactly what I am doing. I hope they make sense. Constructive criticism is welcome.

Jbaisden
Avatar of 2Angel

ASKER

Dear jdaisden:

I am sorry but was out of the office for few days..... I didn't had the time to check your code.... I will do it tomorrow and will let you know...............


Best regards,
Angel
Avatar of 2Angel

ASKER

I am sorry to tell you, but it's not working.
It has many error messages which I don't know what to do with them and an error message about "licens".....

It's seems to me that this code was coming from a different source.....


Thanks, but no thanks......!!!!


Angel
I can understand if you don't want the code. I have no clue what errors you might be getting because it works fine for me. However, the insinuation that the code isn't mine I really don't appreciate. Suit yourself.

Jbaisden
Some things to think about:

I was using VB 6.0 SP 5 (OS: Win 2000) at first and finished the project just on VB 6.0 (XP PRO). I had used Access 2000 to create the database. I had no trouble accessing the .mdb file on my computer at home, even though Access was not installed.

Those are really the only things I can think of that would have caused problems. I guess check and made sure the read-only property is not checked on the .mdb file.

For what you want to do there is ample code on this page already, plus my code. Even if the project doesn't run, you should be able to read the files fine and see my comments and the code. I wish I had coded it like ADSaunders did above, but I didn't look at the code written by the people on this site until after I finished the project; hence, my immense aggrevation when you insinuated that the code was from another source.

The ADO recordset and accessing the database code is common stuff. You can't copy write that when Microsoft releases it for free.

The lot of the project is basic DB accessing and retrieval. The processing logic is my own. That isn't to say I'm the first to do it like that, but I am saying that I did not receive help with it.

In short, you owe me an apology. I put 8 hours of work into that code. An experienced programmer would have only needed 30 min to 1 hour. I admit that I am not; however, I am still a programmer and I stuck with it to the end. Take the code and do what you will. I have received my gratification from this exercise. I will end this comment now before I make remarks I shouldn't make.

Jbaisden
Avatar of 2Angel

ASKER

The zip file you'v sent came with a stamp of VB programers WebSite................
Avatar of 2Angel

ASKER

modulo: Thank you for your comment.

The 2 first solution are nice but I was looking for a more generic solution as I said in my first comment posted at 11/28/2003 03:25PM GMT.

If there is no more to 'say' from ADSaunders & GrahamSkan I will split the point between them just to be fair.....

What do you think about it?


Angel
Avatar of 2Angel

ASKER

Thanks again for evrey thing.............