• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 392
  • Last Modified:

Auto Add text to Word Document

I'm creating an employee manual template that our clients can use to work from for their needs.  I'd like to simplify the personlization of that template by enabling a way to auto-fill certain areas of the document with the client's organization name and in some places their Initials.

I'm not sure what to call that to even look at Google for some tutorials on how to do it.  I'm sure it involves using some sort of Visual Basic tools in MS but just want to see if its something simple enough to make it worth while.

Thanks in advance.
1 Solution
You can use fields to insert the Office user initials at various points in the document. This can also be done with the user name.
These fields are also embodied in Autotext or Building Blocks, depending on the Word version.

If you have Office 2007, or later, try Insert tab, Quick Parts button, Field.. and look for UserName and UserInitials. There is also an UserAddress field, but this is not routinely set up when Office is installed. It could be used for the organisation name.

The text for any of these fields can be set on the dialogue to a new default when a field is being inserted.

Anything beyond that would get complicated and would almost certainly need VBA. You would have to balance the level of automation required with the time and skills available.
RartemassAuthor, martial arts coach, IT ConsultantCommented:
The contents of the fields GrahamSkan suggests are in Word Options on the Popular tab under the section Personalise your copy of MS Office.

This can be set to auto populate from Active Directory but unless the clients are on the same network you can't guarantee this has been filled out the way you want.

You next option is to have VBA that prompts for the user and organisation details, then uses the answers to populate fields. This would be useless if the network security has been set to block macros and VB code from running. If this is something you want more details on please let us know.
axessJoshAuthor Commented:
Its just a couple fields that i want updated.

We've built a template employee manual, and I'd like to set some dynamic fields to update the Church name and Church Initials in several areas throughout the document.

In the Word user options for the computer that will be used by the particular Church, make sure that the name of the church is entered as the User Name under the "User Details" tab, and that under the "User Initials" and "Mailing Address" fields in that same tab you have whatever details you want to have included.  This screenshot is from Word 2003, and more recent versions may differ in appearance and layout.
.You can then easily insert a new "field" where you want these predefined details to show.  

Insert > Field > set "categories" to "User Information" > choose User Name, User Initials, or User Mailing Address from those shown.  You can add together more than one field name so they appear on the same line.
Click "Field Codes" to show more options.When inserted, the fields will be populated with the text set in the MS Office user options.  If you see the code for the fields shown like this instead of the actual values:
you can toggle this to show correctly using the Alt + F9 keys.

A Word document saved with these fields will display whatever values are set in the user options of Word for whatever user is currently logged on.

Does this help you at all?
Thank you axessJosh
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now