Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create word document with 2 tables

Status
Not open for further replies.

EDB2

MIS
Sep 11, 2002
36
US
I've found two other users who asked this question, but neither of them had an answer. I'm hoping I'll have better luck!

I'm creating a word document through code (there are reasons I don't want to use a template). I insert a table and populate it with data, and then I want to get out of that table, skip down a line or two, and insert a 2nd table which will be populated with data.

I haven't been able to do this, the 2nd table keeps inserting inside the last cell of the 1st table. I tried running a macro in Word to see what code was generated, but once the macro is running I can't figure any way to get out of the 1st table.

Can anyone give me a hint how to get out of a table (programatically) once you are through inserting data?
 
You're on the right track with recording a macro and tweaking the code. To actually do what you want in Word, try making 2 paragraphs first. Then insert your table into first paragraph, move down to the next paragraph and insert the second table.

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
That did the trick, thank you so much!
 
You're welcome!

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top