Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-26-2016, 07:12 AM
KWH KWH 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 64bit
Novice
Linking fields to pull values from one field to another
 
Join Date: Jan 2016
Location: Texas
Posts: 2
KWH is on a distinguished road
Question Linking fields to pull values from one field to another

Hello all! This is my first post, so first let me say thank you in advance for any assistance! I hope I have some luck here!



So I work for an engineering company, and we have to plug in client document #s on a template. See below image...



So the document number in large font at the top is directly plugged in via a link to a field in our database. Then at the bottom the document number has to be separated into 6 parts.

I am trying to find out how to link these 6 parts back to the document number - but only the part that applies (as indicated by the arrows). Unfortunately our system cannot support filling in all these parts, so I am trying to get creative.

If anyone has any suggestions, I am all ears (or eyes actually)! Thanks again!
Reply With Quote
  #2  
Old 01-26-2016, 02:08 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: 21,962
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

Word cannot link to parts of a range. Given that the data are inserted from a database (is this a mailmerge?), the only way of automatically replicating the different parts of the document # in the table would be to insert them there directly from the database - which obviously contains all the elements of the document #. Other than that, a macro could be used to export the elements of the document # from the database output you presently have to the table. To do that, though, the macro would have to be able to definitively identify where the document # occurs in the document and where the output table is in relation to any other tables in the document.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 01-27-2016, 06:38 AM
KWH KWH 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 64bit
Novice
Linking fields to pull values from one field to another
 
Join Date: Jan 2016
Location: Texas
Posts: 2
KWH is on a distinguished road
Default

Thank you for your feedback, Macropod!

I honestly have no clue how the data is inserted into the template from the database as our IT department set it up.

In our system we only have 3 columns that will link. If we had more, I would gladly enter all this data separately in different fields so that the info could pull into these fields automatically.

I was really hoping there was a way to pull this off.

However, your last suggestion about the possibility of a macro gave me a small glimmer of hope again. So if this is a standard template that will always pull the data from the exact same field and carry it down to the exact same field, does this seem easy enough to make that work? I will have to go find a guru somewhere that can build this macro for me, but if I know that is possible then at least I have hope!

THANKS AGAIN!!!!!!!!
Reply With Quote
  #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: 21,962
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
Reply

Thread Tools
Display Modes


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 12:55 PM.


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