View Single Post
  #4   Report Post  
Posted to microsoft.public.word.tables
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Linking Many Tables To A Master Document

See the article "What do I do with macros sent to me by other newsgroup
readers to help me out? at:

http://www.word.mvps.org/FAQs/Macros...eateAMacro.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
"jbell" wrote in message
...
Doug,

Thanks for taking the time to respond, and for that bit of code.
I suspected that autonumbering of bookmarks was possible, I just didn't
know
how to make it happen. Your assumption that I was doing it manually is
correct since I have no experience using VB in word. If necessary I'll
learn,
and give your solution a try.

Thanks again,
--
Jim Bell


"Doug Robbins - Word MVP" wrote:

Why is the assignment of the bookmarks not practical? Are you doing it
manually? It would be very easy to write the necessary code to assign
the
bookmarks automatically. In fact, the following will assign bookmark
names
of Table1, Table2, etc in the blink of an eye:

Dim i As Long
With ActiveDocument
For i = 1 To .Tables.Count
.Bookmarks.Add Name:="Table" & i, Range:=.Tables(i).Range
Next i
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
"jbell" wrote in message
...
Hi All,

Im working in Word 2000 and trying to create a master Word document
that
has tables linked to it from another Word document. The Word document
that
contains the tables is automatically created by another, outside,
program.
In
other words, when I run this third-party program, its output is a Word
document that contains a number of tables. I need a way to link these
tables
to my master document. The tricky part is that every time I run the
third-party program I get a new document with a different set of
tables.
The
good news is that the tables are the same size and have the same
formatting
every time, only the data in the tables changes.

Ive tried assigning a Bookmark to each table every time the
third-party
program runs and that works, but is not practical due to the number of
tables
(about 75) each time it runs. Ive also tried exporting the tables
en-masse
to an Excel file and then creating links to the master document using
Insert/File/Range based on cell positions. This works as far as moving
the
data is concerned, but I lose table column formatting in the transition
to
Excel.

Am I on the right track here? Any suggestions would be greatly
appreciated.

Thanks,
--
Jim Bell