Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 01-27-2016, 02:25 PM
macropod's Avatar
macropod macropod is offline Linking fields to pull values from one field to another Windows 7 64bit Linking fields to pull values from one field to another Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,526
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

The macro could be fairly simple. For example, suppose the 'Document Number' paragraph is the always first in the document and the table is always the last table in the document:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim StrTmp As String, i As Long
With ActiveDocument
  StrTmp = Replace(Split(.Paragraphs(1).Range.Text, ": ")(1), vbCr, "")
  With .Tables(.Tables.Count)
    For i = 0 To 5
      .Cell(5, i + 2).Range.Text = Split(StrTmp, "-")(i)
    Next
  End With
End With
Application.ScreenUpdating = True
End Sub
There's a bit of guesswork in the above regarding your table, as I'm not quite sure of its layout.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking fields to pull values from one field to another Help with macro not working - Pull from fields > attaches doc from folder > sends email mikey386 Excel Programming 2 01-08-2015 12:20 AM
Linking fields to pull values from one field to another Automatic updating / Linking fields / cross referencing Shaz Word 2 07-21-2014 09:43 PM
Linking fields to pull values from one field to another Conditionally Email People Based on Values in Fields dawsonh2002 Mail Merge 2 12-12-2012 12:11 PM
Fields controlled by List box values farfromapro Word 0 02-11-2009 02:19 PM
Linking Text Fields in a document in Word 2007 lcolson Word 0 12-22-2008 05:14 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:49 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