#16
|
||||
|
||||
Simply open the document, press Alt-F11 to ope the VBA Editor and copy/paste from there.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#17
|
|||
|
|||
Thanks for your swift reply after so many years of this thread being dormant!
I'm not seeing the code "pane". I'm new to this as you can probably guess. MACRO Example.docx |
#18
|
||||
|
||||
That is a code pane, but you evidently didn't open it from the 'Formfields - Table Rows Add' document. No matter, simply click on the + sign next to that entry, then double-click on that project's 'ThisDocument' code module.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#19
|
|||
|
|||
Thank you Paul.
|
#20
|
|||
|
|||
Sorry Paul, being very new to this and somewhat simple minded I can't get it to work despite you expansive instructions in the Macro itself. I have tried using the Record Macro feature with some success, however, it won't maintain sequential numbering and requires a button on the QAT which is sub optimal.
The document contains 3 separate tables and I wish in each case that when the row is complete a new row is automatically generated. Some departments will have a dozen or so rows to complete, others will have dozens hence not wishing to fix the number of rows. My instinct is to restrict editing on this just allowing the user to fill in the form and not fiddle with the headings. Am I being too ambitious or is this achievable by a complete novice? |
#21
|
||||
|
||||
Without wanting to place too fine a point on it, the macro discussed in this thread is for use in documents containing formfields. Your document has no formfields; it has content controls.
For adding a new row to a table in a document with content controls, see: Code to add new row in table Macro to add row to table in a Word form https://www.msofficeforums.com/word-...tml#post145675 The first of these has all you need. There is certainly no need for a button on the QAT when using the correct code. The reason you needed one for the code in this thread is that you're not using formfields and, as a result, can't use their 'on exit' macro property to trigger the code; this isn't required for content controls.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#22
|
|||
|
|||
Thank you Paul, I will now work through what you have given me so as to learn for the future.
Hope you're not near the fires, stay safe. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro help sought for Word table | xan | Word VBA | 1 | 04-20-2012 07:50 PM |
Create Table Form from Word Document | gsj224 | Word VBA | 3 | 07-31-2011 09:26 AM |
Word Macro That Checks a Check Box Form Field When File Print is Executed | DKerne | Word VBA | 4 | 06-09-2011 11:54 AM |
Do I need a Form or a Macro?? | Keith24249 | Excel | 0 | 08-23-2010 06:23 AM |
Use Form Checkbox to Add Table | laxonator | Word Tables | 0 | 10-23-2008 06:21 AM |