#1
|
|||
|
|||
Automatic new rows in a table and hidden text in a word document
Hi!
I have basically no experience with VBA and Word. But today I was asked by a colleague to help her out with a form she did. I'll try to do my best to explain exactly what I need help with. She has a document with restricted editing that she's gonna send out. This is a form that people should fill out during meetings. 1. She has two tables and she wants to press enter to create a new row with cells. This is because it's a different numbers of participants and/or actions during these meetings. 2. She has a check box answer to if there's a plan or not. If you click yes then you're supposed to see the plan in the document.. I'm sorry if I'm overly detailed, or don't give you all the details. I'm, like I said, a noob when it comes to Word and VBA. I don't even know if this is possible. Especially with a document with restricted editing. Thankful for all the help I can get! Last edited by stuntmannen; 04-05-2016 at 05:56 AM. Reason: Attached file. |
#2
|
||||
|
||||
For the table row addition, see:
https://www.msofficeforums.com/word-...html#post38312 Regarding the Yes/No checkboxes, I'd suggest replacing them with a single dropdown with Yes/No options. Amongst other things, that avoids the complications of trying to make the checkboxes mutually exclusive and the conditional output can be managed by simply checking the dropdown's 'calculate on exit' property and using an IF field to test its state. For a demonstration of that, see: https://www.msofficeforums.com/word/...html#post52434
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thanks for the quick response. I've played around a little and found some interesting things. I didn't quite get your tips to work the way I wanted to. But I think I have a better way of explaining what I want.
I have a table with two rows. In the first row I have a question and a combo box. The options in the combo box are yes and no. I want no to be default and that hides row two in the table. If you select yes, row two is visible. Is there a easy way to do this? I'm still trying to get the add row to work. Thanks again! |
#4
|
|||
|
|||
After reading some more I think it's a drop down list I'm supposed to use, and not a combo box.
|
#5
|
||||
|
||||
It really doesn't matter what kind of formfield you use, the macro works the same way, regardless. As for "I think it's a drop down list I'm supposed to use, and not a combo box", there is no such thing as a combo box formfield. There is a combo box content control, but your shouldn't mix content controls and formfields in the same document - besides which the code in the link only works with formfields.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
hidden text, tables |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
VBA to keep hidden rows hidden when filtering | tectonicseer | Excel Programming | 1 | 07-27-2014 11:54 AM |
programmatically inserting hidden text into a Word 2010 table | epid011 | Word VBA | 16 | 12-30-2013 11:29 AM |
Hidden text in table | Angel9520 | Word Tables | 1 | 05-02-2012 01:00 AM |
how to view hidden rows | gsrikanth | Excel | 10 | 01-27-2012 05:29 AM |
hidden rows | gsrikanth | Excel | 5 | 01-19-2012 02:40 PM |