Tech Support Guy banner
Status
Not open for further replies.

Word XP Forms question

1K views 8 replies 3 participants last post by  ubercam 
#1 ·
I've searched high and low, yet I cannot find the answer to my question.

Basically what I'm trying to do is make a customer-editable lease contract document for a customer of mine. I know the basics of Word forms, and I've entered the various fields (ie. Lessee's Name, Address, Phone, etc), and there are a couple of redundancies in information (specifically names of Lessee and Co-Lessee, so text). Instead of making the lessee type out the same info twice, I thought that I'd set it up so that if they enter their name at the top, it would be entered at the bottom in the same field automatically. I can get this behaviour to work time and time again with numbers (quite simple really), but is this at all possible with text? No matter what I've tried, I can't get it to work, and I've tried everything except ask someone. I'm a reasonably logical and intelligent guy, but I'm at wit's end here with this one.

Thanks,
Cam
 
#2 ·
Well....

My answer may get laughed out of the forum if someone has a simpler solution, but...

I will share with you something that I basically stumbled across one day and have been using ever since. I always assumed there was "a better way," but I just kept using what I knew. However, considering that ubercam has spent far more time researching this than I and yet ubercam still has not found an answer, then maybe my little roundabout method ain't so bad afterall.

Here's my (possibly lame - or not) technique:

Insert an "ask" field, that will look like this:
(also, the ASK field must be placed at the beginning, BEFORE the position of the first REF field)

{ ASK Lessee "Enter name of Lessee" \* MERGEFORMAT }

(actually, the \* MERGEFORMAT is probably not even necessary)
The way I insert the field is by clicking "Insert" then "Field," then under categories I look in "All" and the ASK field is right near the top of the list of "Field Names."

Then, you can insert as many REF fields as you want. They will look like this:

{ REF Lessee \* MERGEFORMAT }

As you can see, the "Lessee" part should match between the ASK and the REF fields.

Then, for a third and final step, you write a macro like so:

Code:
Sub Ask_Me_For_Input()

ActiveDocument.Fields.Update

End Sub
When you run the macro, an input box will display where you can type the Lessee's name. Once you do so, all of the REF fields will subsequently be updated by the macro, and so the REF fields will each display the Lessee's name that was inputted.

Does that make sense?

I'll be happy to clarify further or to upload an attachment (like a zipped doc) to demonstrate.

Let me know!
-Kelly
My MS Word Macros
 
#3 ·
What's the matter with bookmarks?

What kind of FORM are you using?
If fields from the forms toolbar, make sure you "calculate on exit" in the properties of those forms.

To have them appear again somewhere else, insert bookmarks. But don't put another form field...
 
#4 ·
Dreamboat is right!

Dreamboat's method actually cuts out several of my steps.

So if you have a Text Form Field named "Text1," then just put the cursor where you want the text to be duplicated, hit Ctrl+F9 to get some field brackets inserted, then type "Text1" between the brackets.

There is one aspect of my original answer which I would still hold on to, and that's the ActiveDocument.Fields.Update

That's only because it bothers me that I can't see the new value of the { Text1 } bookmark field immediately after the user puts some text into the Text Form Field.

So using Dreamboat's suggestion, you have a Form Field and various { Text1 } bookmark fields.

So all I would do is write the macro like so:

Code:
Sub UpdateMyFieldsNOW()

ActiveDocument.Fields.Update

End Sub
and then go to the Properties dialog window for the original Text Form Field and make sure to list "UpdateMyFieldsNOW" as the macro to run where it says "Run Macro on Exit:"

does that make sense?
 
#6 ·
Dreamboat,

you're right again!!

I could've sworn I tested the "calculate on exit" thing with no success, but I have now just tried that little trick again, and of course now it's working for me.

awesome.

Thanks!

-Kelly

(PS - I think I'm more excited about all this than Ubercam is!)
 
#7 ·
Ah excellent! This is what I was looking for actually, to make use of the bookmarks.

I did have one problem though with what you've suggested: when I did insert bookmark, then typed in my field, nothing appeared down where I inserted the bookmark. Not the desired effect. Confused, I checked the field properties, and there was no longer a bookmark in the form field, but instead it was where I'd inserted it.

I scratched my head for a few seconds and found what ended up being my solution to the problem. In the menu bar under Insert > Reference > Cross-reference I found that you can cross reference bookmark text (and basically any other thing you can imagine) to other locations in the document, which ended up being exactly what I was looking for in the first place!

Don't get me wrong here, but without your suggestion, I never would have come up with that, there's no way. The whole bookmark thing got me thinking about linking and referencing, and then I saw that in the menu and bang, it works! Thank you immensely! Even though it's only for 2 little fields, it makes me feel so much better and also like I'm doing a far far better job for my customer than I otherwise would have... I'm a perfectionist you see ;)

Again, I thank you very much for your suggestions!! :up: :up: I hope this is as helpful to others as it was to me. Kelly obviously got some use out of it, so I can't be too far off :D
 
#9 ·
Oh yeah for sure! The customer sent me the document he wanted modified. It came protected. I just had to make some necessary changes and I told him I could do the whole type-once-appear-in-many-places thing, and he seemed quite interested in that, so I tried, failed, asked you guys and got it figured out!
 
Status
Not open for further replies.
You have insufficient privileges to reply here.
Top