Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 09-15-2014, 11:20 PM
gmayor's Avatar
gmayor gmayor is offline Link cells in word doc (table) to update from 2 separate docs - can this be done? Windows 7 64bit Link cells in word doc (table) to update from 2 separate docs - can this be done? Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,142
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

The code only goes in the summary.
The code assumes that the document names you provided are correct.

The names are used at

Set oSourceA = Documents.Open(FileName:=oTarget.Path & "\" & "Dept A - detail.docx", AddToRecentFiles:=False, Visible:=False)
Set oSourceB = Documents.Open(FileName:=oTarget.Path & "\" & "Dept B - detail.docx", AddToRecentFiles:=False, Visible:=False)

If you add more rows then you will need to process those rows also. The code for a single row from one of the sources is

Code:
oTable.Cell(2, 3).Range.Text = oSourceA.Tables(1).Cell(2, 6).Range.Text     
oTable.Cell(2, 3).Shading.BackgroundPatternColor = oSourceA.Tables(1).Cell(2, 6).Shading.BackgroundPatternColor
The syntax is .Cell(Row, Column)
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Link cells in word doc (table) to update from 2 separate docs - can this be done? Is it possible to copy non-contiguous rows of a Table and paste them as a separate Table in Word? Joey Cheung Word Tables 1 08-12-2014 05:15 PM
Update Link very slow -PowerPoint Charts & object, cells etc Linked to Excel johnseito PowerPoint 0 01-28-2014 06:24 PM
Why does Word separate table and reference endnotes by allowing text to go in between newby2013 Word Tables 2 12-31-2012 03:45 PM
How to link an object to a URL link to update automatically expert4knowledge Excel 1 06-11-2012 09:30 AM
Link cells in word doc (table) to update from 2 separate docs - can this be done? Adding identical footers to 187 separate docs sqzdog Word 11 10-31-2011 01:46 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:23 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft