Word - insert rows based on cell value

[Closed]
Report
Posts
1
Registration date
Monday November 14, 2011
Status
Member
Last seen
November 15, 2011
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
Hello,
I am a macro novice with several questions. Please help!

1. I created a Document Change form with tables in word. The user will input a number "n" into one of the cells. I need to have word automatically insert "n-1" rows after a certain cell in 2 of the tables.

2. How are cells from Word tables referenced in code? For example, if I'm referring to the cell in the 3rd row and the 2nd column in one of the tables, how would that be designated?

3. Is there a difference between a "macro" vs. "VBA"?

Thanks so much,
Sandra

1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
I dont think you would be able to do it in Word (not at least without macro). The simple workaround I can think of is that you copy this table. Paste in excel. Use text-to-column option to split into cells and then paste back in word

Having said that
for #1 and #2, see if this helps
http://www.gmayor.com/word_vba_examples.htm


for #3, VBA is visual basic for application. In nutshell language. Macro is the product of that language. so basically you use vba to write macro in microsoft office products