Project file automation Office

We have many separate systems forming our project folder for each project

A project normally consists of the following Office "templates"

- test document ( Excel file )
- instruction page ( Word file)
- thank you for buying ( Word file )
- products in project ( Excel file )

Etc etc

Common is that they are Office documents that we manually fill in for each customer - which we will have to keep doing - but one thing I'm hoping we can automate in some way is updating certain common fields in each from either the folder name they are in

/projects/2015/%idnumber-custumername%/

Or from a controller file

Is this doable or very complicated?

Does anyone know of a project handling software or similar that would do this?

Thanks in advance
DanteAdminAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

aikimarkCommented:
You can add code to the _Open() event to update parts of the document.  The catch might be that it can be difficult to determine your current folder until you have saved the file.  Templates are not usually stored in sub folders.
Jacques Bourgeois (James Burger)PresidentCommented:
No project handling software can to that, because the variety of documents that can created with Excel and Word is to great, and what you want to id in each is different. But the features to do what you want are already built-in.

In Word, a feature such as Mail Merge is often used for such purposes.

In all Office applications, you can use VBA (Visual Basic for Applications), the macro language that can be accessed by Alt-F11 by default. At the level that you seem to need, the language is quite easy to learn for somebody who has some experience in programming, or simply has it for a bit of logic. Most advanced training in Word or Excel includes some if not a lot of VBA. I know secretaries who use it regularly to save time and repetitions in their work.

VBA can easily read a reference file, a database entry or the file structure of a hard disk to get the needed information, and then it is quite easy to replace fields or bookmarks in Word, or change the value of specific cells in Excel with the retrieved value.

Here is a little example for Word:

Private Sub Document_Open()

  Dim customerName As String
  Open "Data.txt" For Input As #1
  Line Input #1, customerName
  Bookmarks("CustomerName").Range.Text = customerName
  
End Sub

Open in new window


This routine runs from a document, but it could be set up to run from a template (which is usually preferable for what you want to do.

- It runs when you open the document.
- It creates a variable (data holder) called customer.
- It then opens a file called Data.txt in the same directory as the Word document.
- It reads the first line in the file and stores it in the customer variable.
- It then replaces a bookmark previously set to the proper position in the document with the line retrieved in the file.

It requires a bit of learning to get started, but nothing really hard. Most good books about Word have a chapter on VBA at the end, and there are also books dedicated to the stuff. Once you know the basics, you evolve as you need and can automate a lot of tasks.

You would also easily find help here if you are stuck somewhere.

It's quite possible that somebody in your organization already dabble with VBA and could give you a hand with such a project.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.