#1
|
|||
|
|||
adding table to a particular place
Hi everyone,
I would like to get some help on adding a table to a given place into a word document from an excel macro. I used thwe word macro-recorder to get the syntax, but it doesn't work from excel, and it doesn't answer my question, how to insert the table to the place where I want it to be. Code:
I wanted to do it something like this: Dim objword As Object Dim docword As Object Set docword = objword.documents.Add(Path & "\test.dotx.") docword.tables.add Range:=docword.Bookmarks("mybookmark"), numrows:=2, numcolumns:=2 Thanks |
#2
|
||||
|
||||
Hi hklein,
You'd at least need to use the bookmark's range, not just its name: docword.tables.add Range:=docword.Bookmarks("mybookmark").Range, numrows:=2, numcolumns:=2
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Many thanks, it is really the solution.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
adding rows to word table | hklein | Word VBA | 4 | 07-18-2011 12:21 AM |
I delete an image but it comes back again and again to the same place!!!!!!!! | Jamal NUMAN | Drawing and Graphics | 2 | 06-28-2011 04:47 AM |
Adding table lines to protected form | razberri | Word Tables | 2 | 10-27-2010 05:58 PM |
Adding a Total row to pivot Table | hannu | Excel | 1 | 09-18-2010 01:15 AM |
tif will not place in word | rachelp61 | Word | 2 | 10-13-2009 07:27 AM |