Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
Jamie Jamie is offline
external usenet poster
 
Posts: 45
Default Copying Rows with Form Fields

Im working in Word 2003. Im creating a template with a table and form
fields. The table make up is this:

1st row has 4 columns
Date: (text in column 1) €“ form field (column 2) €“ Client Name: (text in
column 3) €“ form field (column 4)

2nd row has 4 columns:
Referred To: (text in column 1) €“ form field (column 2) €“ Follow-Up Date:
(text in column 3) €“ form field (column 4)

3rd row has 1 column:
Comments: form field

I would like to attach an on exit macro to the Comments form field that asks
the user if they would like to add another client. If they click on Yes, the
document would unlock and all three rows are copied with the form fields €“
however, the form fields need to be blank. Once copied the template would
lock again.

The user may need to do this many times; add clients.

Any help you can provide is appreciated. Thanks.

--
Jamie
  #2   Report Post  
Posted to microsoft.public.word.tables
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Copying Rows with Form Fields

On Thu, 14 Feb 2008 16:45:01 -0800, Jamie
wrote:

I’m working in Word 2003. I’m creating a template with a table and form
fields. The table make up is this:

1st row has 4 columns
Date: (text in column 1) – form field (column 2) – Client Name: (text in
column 3) – form field (column 4)

2nd row has 4 columns:
Referred To: (text in column 1) – form field (column 2) – Follow-Up Date:
(text in column 3) – form field (column 4)

3rd row has 1 column:
Comments: form field

I would like to attach an on exit macro to the Comments form field that asks
the user if they would like to add another client. If they click on Yes, the
document would unlock and all three rows are copied with the form fields –
however, the form fields need to be blank. Once copied the template would
lock again.

The user may need to do this many times; add clients.

Any help you can provide is appreciated. Thanks.


Set up the three rows with empty form fields, select them, and store them as an
AutoText entry in the form's template. In the exit macro, unprotect the
document, insert the AutoText in the paragraph immediately after the table
(which makes it part of the table), remove the exit macro from the previous
comment field and add it to the new comment field, and reprotect.

There is one caveat: AutoText can only be stored in a template, not in a
document. If you're going to be sending this form to other computers, make the
form itself a template (.dot) file so the AutoText doesn't get separated from
the form.

If you want coding help, ask in one of the Word VBA newsgroups.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
  #3   Report Post  
Posted to microsoft.public.word.tables
Jamie Jamie is offline
external usenet poster
 
Posts: 45
Default Copying Rows with Form Fields

Hi Jay, I highlighted the rows and created an Auto Text entry, but I am
unsure as how to have the auto text entry run as an on exit macro. I would
like the copying and pasting of the rows and form fields to be a seemless
process like a macro, not inserted as auto text. I'll follow your
suggestion and post in another newsgroup.

Thanks
--
Jamie


"Jay Freedman" wrote:

On Thu, 14 Feb 2008 16:45:01 -0800, Jamie
wrote:

Im working in Word 2003. Im creating a template with a table and form
fields. The table make up is this:

1st row has 4 columns
Date: (text in column 1) €“ form field (column 2) €“ Client Name: (text in
column 3) €“ form field (column 4)

2nd row has 4 columns:
Referred To: (text in column 1) €“ form field (column 2) €“ Follow-Up Date:
(text in column 3) €“ form field (column 4)

3rd row has 1 column:
Comments: form field

I would like to attach an on exit macro to the Comments form field that asks
the user if they would like to add another client. If they click on Yes, the
document would unlock and all three rows are copied with the form fields €“
however, the form fields need to be blank. Once copied the template would
lock again.

The user may need to do this many times; add clients.

Any help you can provide is appreciated. Thanks.


Set up the three rows with empty form fields, select them, and store them as an
AutoText entry in the form's template. In the exit macro, unprotect the
document, insert the AutoText in the paragraph immediately after the table
(which makes it part of the table), remove the exit macro from the previous
comment field and add it to the new comment field, and reprotect.

There is one caveat: AutoText can only be stored in a template, not in a
document. If you're going to be sending this form to other computers, make the
form itself a template (.dot) file so the AutoText doesn't get separated from
the form.

If you want coding help, ask in one of the Word VBA newsgroups.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying and pasting form fields inside frames Purplejopeg Page Layout 1 October 4th 07 01:43 PM
Automatic copying of form fields clatters69 Microsoft Word Help 1 September 20th 06 11:37 AM
Copying 200 default rows from excel print 74 only in word. Adjusting TOCto reflect page numbering Microsoft Word Help 3 September 20th 06 03:28 AM
Repeating Rows with Form Fields LPS Tables 1 May 20th 06 07:41 PM
Q: Automatically adding form fields to new rows in table Richard J Tables 1 December 29th 05 03:10 PM


All times are GMT +1. The time now is 12:54 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"