Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word Form Fields & Programming

Status
Not open for further replies.

gentrya

Technical User
Mar 19, 2003
10
US
I have created a template that uses Word form fields so the user has a standard format for entering information to be printed for an outside vendor. For example, the user enters their name, address, part number, etc. Some of the users will have a two-line street address and others will not. How can I create a macro or module that will take the "null" second line, remove it, and place the city, state and zip in its place.

It now looks like this:

First Last
Street

City, State Zip

and I want it to look like:

First Last
Street
City, State Zip

Thanks!
age
 
I always recommend to use VBA to create a form and let people fill it in, and then let the code take care of placing it in the document with help of bookmarks.

Eman_2005
Technical Communicator
 
Thanks! Any recommendations on books for learning VBA?

age
 
Have a look in the Help within word.
Under Contents, if you expand the Microsoft Word help, you will find programming information.
There you pick what you need. There are also some examples.
Then wherever you get stuck or unsure, we are here to help :)

Eman_2005
Technical Communicator
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top