If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Linking Many Tables To A Master Document
Hi All,
I’m 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. I’ve 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. I’ve 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 |
#2
|
|||
|
|||
Linking Many Tables To A Master Document
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, I’m 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. I’ve 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. I’ve 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 |
#3
|
|||
|
|||
Linking Many Tables To A Master Document
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, I’m 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. I’ve 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. I’ve 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 |
#4
|
|||
|
|||
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, I’m 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. I’ve 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. I’ve 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 |
#5
|
|||
|
|||
Linking Many Tables To A Master Document
Doug,
Thanks for the link to the mini-tutorial. Using those instructions I did a small scale test and it seems to work fine. You MVPs are the greatest, thank you for supporting such a valuable resource. -- Jim Bell "Doug Robbins - Word MVP" wrote: 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, I’m 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. I’ve 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. I’ve 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 |
Thread Tools | |
Display Modes | |
|
|