Forms - adding fields

C

consiglieri

Hi

I'd like to create a form that has a button in the document where the
user can add a form field if needed. The reason for this is that the
number of fields needed varies. I'd like it to be easy for the user to
just add a field. Is this possible?

Thanks
 
J

John McGhie

Yes, it is, but you will have to code it up in VBA and it can become
EXTREMELY complex.

The easy bit is to store your field as an AutoText and create a macro button
that inserts it. To make it easier to position the result, add a bookmark
that the code can "go to" before it inserts the field.

Your code will need to Unprotect and then re-protect the document.

If you then need to bind the field to some data ‹ that gets really hairy.

Try this much and see if it does what you want...

Cheers


Hi

I'd like to create a form that has a button in the document where the
user can add a form field if needed. The reason for this is that the
number of fields needed varies. I'd like it to be easy for the user to
just add a field. Is this possible?

Thanks

--
Don't wait for your answer, click here: http://www.word.mvps.org/

Please reply in the group. Please do NOT email me unless I ask you to.

John McGhie, Consultant Technical Writer
McGhie Information Engineering Pty Ltd
http://jgmcghie.fastmail.com.au/
Nhulunbuy, NT, Australia. S12.22.1918,E136.99.5392
+61 4 1209 1410, mailto:[email protected]
 
C

consiglieri

Yes, it is, but you will have to code it up in VBA and it can become
EXTREMELY complex.

The easy bit is to store your field as an AutoText and create a macro button
that inserts it. To make it easier to position the result, add a bookmark
that the code can "go to" before it inserts the field.

Your code will need to Unprotect and then re-protect the document.

If you then need to bind the field to some data ‹ that gets really hairy.

Try this much and see if it does what you want...

Cheers





--
Don't wait for your answer, click here:http://www.word.mvps.org/

Please reply in the group. Please do NOT email me unless I ask you to.

John McGhie, Consultant Technical Writer
McGhie Information Engineering Pty Ltdhttp://jgmcghie.fastmail.com.au/
Nhulunbuy, NT, Australia. S12.22.1918,E136.99.5392
+61 4 1209 1410, mailto:[email protected]

OK Thanks for the suggestion, I'll give it a whirl.
VBA could be doable but considering that office2008 will not support
VBA I will skip even trying VBA.
 

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