View Single Post
 
Old 01-11-2020, 01:46 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Your code indicates you're using formfields, not content controls for the dropdowns. The two are entirely different. Moreover, you seem to have all the existing content inside a single rich-text content control. Bad idea. Content controls and formfields were not designed to be used together and trying to do so can lead to problems.

Your basic issue can be solved by using a Word table as a container, and a suitable macro to drive the process from the last formfield or content control in that table. You will, of course, need to rename your formfields and modify your existing code to continue working with those. The advantage of using content controls, on the other hand, is that they don't require document protection to work (though that can be used) and don't require each new set to be renamed.

For code that works by adding a new row to a table in a document with formfields:
Macro to add row to table in a Word form

For code that works by adding a new row to a table in a document with content controls:
Code to add new row in table
Macro to add row to table in a Word form
https://www.msofficeforums.com/word-...tml#post145675
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote