Import paragraph

K

Ken T

I work for a company that writes engineering specifications. We have a manual that contains approximately 1000+- standard "paragraphs" (could be a sentence, paragraph or full page form). The current process under Word Perfect is each paragraph is in a separate numbered file. When a specific paragraph is needed in a specification, the user does an "Insert File" command and inputs the file number corresponding to the desired paragraph. This process seems very inefficient to me

We are now switching over to Word. I was thinking there should be a way to create a master document containing all the standard paragraphs, each one numbered consecutively. When needed, the user would run a macro and input the paragraph number in a userform. The macro would then go to the master document, do a "look up" for the paragraph number and import the paragraph into the spec document

Is there a more efficient way to complete this process? I am relatively new to VBA and could also use some help with coding. Thanks in advance.
 
P

Peter Hewett

Hi Ken T

There's a number of solutions to your problem. However, the one solution I would avoid is
trying to maintain all of the text in one document. Given the variations in the source
data you are trying to combine (from single line to multi-page documents) I'd take a
hybrid approach to the problem. You could maintain the status quo and keep 1 document per
"item", but it's not very elegant having to sort through and maintain 1000+ documents!

I would combine discrete documents for the longer "items" with Words AutoText feature.
AutoText are named entries that are stored in a template. An AutoText entry can contain
formatted text, tables, graphics, in short anything you can put in a Word document you can
store as AutoText. All of the AutoText entries can be stored in one template, drastically
reducing the number of documents required.

So that your application can determine where a particular entry is stored (either in a
file or an AutoText entry) I'd create an intermediate table. This table would contain
your "item" numbers (if you still wish to retain them) and a very brief description. This
description can be displayed to aid the user in selecting the correct "items" and is much
friendlier than just a series of numbers. Along with the item number and description
would be the data location. This would either be the name of the document or the name of
the AutoText entry in the template.

You could list all of the available items in a UserForm using a ListBox so that the user
can just tick the entries they want to use.

One really important element is the set-up. Before rushing in to creating/converting
these document create a new template for this project. Ensure that all of the required
numbering schemas are correctly defined in the template. If you don't do this, this task
can turn into a nightmare when it comes to combining all of the "items" together.
Numbering in Word is *very* fussy! Ensure that *all* of the documents are created using
this template. This template in addition to being the parent of all documents is also
where you keep the AutoText entries.

Whether you decide to use the above approach or stick with the 1 item = 1 document method
- good luck with your project.

HTH + Cheers - Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top