Merging two Text Form Field's, like Concatentate from Excel.

J

Joshua

I am trying to create a form. I would like to be able to merge fields
together sort of like concatenate in excel but have not had much luck.

I have tried =Text2&" "&Text4 under calculcation. I also tried
inserting a new field and looking at listing of field codes available.
Didn't see any that would do this.

I know it has to be simple, but for the life of me I cant figure it out
and google nor technet have assisted in this matter :(

Thanks alot!

Joshua
 
W

Wraithchilde

It depends on how you want to do it. You can do it with a macro or with a
field. If you'd rather using a field this works. There's probably a better
way but it works.

I can only get this to work with an IF so far. Let's say you have two
bookmarks, form fields, etc. It works the same way for either. Let's say
their names are bkm1 and bkm2. You insert a field (Ctrl+F9) and use Alt+F9 to
show or hide the code. You'll see two braces. Click inside of them.

Type: IF 1 = 1 "" ""

This will always be true of course. Now click inside the first pair of
quotes. Now hit Ctrl+F9 again. Move outside of the new braces but still
inside the quotes and hit Ctrl+F9 once more. You should now have something
that looks like this:

{ IF 1 = 1 "{} {}" "" }

Make sure there is a space between your two braces in the quotes if you want
a space between the text values. Now what you do is add the names of the
bookmarks/form fields inside the two braces. So it looks like:

{ IF 1 = 1 "{ bkm1 } { bkm2 }" ""}

The only problem is it blows up if either or both of the bookmarks are
destroyed and Word may actually crash. I haven't figured out a solution to
that yet.

I'm not sure how familiar you are with field codes but you MUST use Ctrl+F9
to produce the braces and not just type them. It won't work that way.
 
J

Joshua

Geez..

Seems like something that should be a field code, glad to see it wasn't
something easy I was missing.

I'll try your method but if that fails I can always create a macro.

Thanks, I appreciate all your assistance.

Joshua
 
C

Cindy M.

Hi Joshua,
I am trying to create a form. I would like to be able to merge fields
together sort of like concatenate in excel but have not had much luck.

I have tried =Text2&" "&Text4 under calculcation. I also tried
inserting a new field and looking at listing of field codes available.
Didn't see any that would do this.
Form fields usually have names, that also function as bookmarks. The REF
field picks up content from a bookmark and displays it. You can use a
QUOTE field to bring together multiple fields (and text) into a single
"entity". So, for example:

{ Quote {Ref Text2} {Ref Text4} }

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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