VBA Quote ? (MS Office 2000)

Hi there! Someone has given me the task of finding out how long it would take to come up with a VBA program that would take a whole collection of documents - create new ones based on a new template and copy the guts from the old one and paste them into the new one? Document properties are being used for title and subject, company name and several custom properties.

Would this be possible at all - or just the twisted fantasy of some management type!

Re: VBA Quote ? (MS Office 2000)

Its possible, I've done something like that already.

If you know VBA then it shouldn't been too difficult.

To get the framework in place should take about 2 to 5 days and then to develop the section to rip the information from the old document and place it in the new should take about 2 or 3 days per basic document layout of 1 to 4 pages.

These are estimated times which includes some basic tesing and is dependant on your knowledge of and versatility in VBA and the speed of you machine and complexity of the documents.

Re: VBA Quote ? (MS Office 2000)

Yes - that's the long and the short of it. However, I have almost 7000 documents to do - and they are not in a single directory structure. The "suggestion" given to me was to have someone write the code and then someone else just has to push "start" and POOF ... VOILA ... we're done.

Re: VBA Quote ? (MS Office 2000)

I think there are probably 1000's of such VBA programs out there. I too have written an entire document assembly program in VBA that does what your boss wants. There are also OTS (off the self) products that are just waiting for you to slap in the templates and define the parameters.

Re: VBA Quote ? (MS Office 2000)

For reasons described above, I don't think that's the hardest part. An example is attached. (This is a .DOT temporarily renamed to .DOC for ease of posting.) (At some point I stopped sorting the folder names; I can't recall why.)

Rule 10: Do not make Private requests
Please keep your questions and answers on the open boards. We discourage sending or asking for replies via email or Private Message. This defeats the purpose of the Lounge which is designed to share information as widely as possible. If you are worried you will miss any replies, check the box to receive email notifification. You can also set this globally in the Email/Subscriptions section of your Profile.

Rule 12: No Spam, Blatant Advertising or Soliciting
This is rare here as well. Just don't post an advertisement or offer a service for compensation. You can place your urls etc. in your signature. Also, you can recommend sites that may help people (your own included) - but only if it answers or helps to answer a question that has been asked within the topic in which you are posting. Spam will be deleted.

Re: VBA Quote ? (MS Office 2000)

> have almost 7000 documents to do - and they are not in a single directory structure.

I do this all the time - maybe I want to replace the header on a set of web pages, or want to convert 70,000 WP51 docs to Word, or maybe I want to detect which, of 20,000 docs, have the string "Christopher Greaves" within them.

Grab/ask for a copy of my Files processor. It does all the dirty work of determining which FILES (more embracing than DOCuments) you want to process; you can nominate a directory tree, extent, file size ranges, date modified ranges etc etc; you can effect a random sample (for a trial run).

Files processor will open each nominated file and pass control to a macro called "Process"; it will build a dummy Process macro in your Normal.dot, if you want it to.

Your process macro then invokes whetever you want.

If i want to generate an Index in each of 15,000 documents, my process macro looks like this:-

Re: VBA Quote ? (MS Office 2000)

In order to find the files on the hard drive, consider going to the msdn.microsoft.com and downloading the filects.exe file. When it expands, it provides you with a sample VB program that will locate files with a specific extension and will search directory and subdirectories for all files with a specific extension. If the documents that you were looking for where in client subdirectories below a directory marked client, when pointed to client, this program will search all the folders below client for word documents( files ending with the extension *.doc).
Good luck