Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-29-2012, 01:01 AM
Wade Wade is offline 'Linking' entered information to other "cells" from an original "cell" in MS Word Windows 7 32bit 'Linking' entered information to other "cells" from an original "cell" in MS Word Office 2010 32bit
Novice
'Linking' entered information to other "cells" from an original "cell" in MS Word
 
Join Date: Aug 2012
Posts: 4
Wade is on a distinguished road
Default 'Linking' entered information to other "cells" from an original "cell" in MS Word

Hello



In MS Excel it is easy to reference the contents of one cell to that of a secone cell by entering the "=" sign, referencing the first cell and then pressing enter.

However, how the hell do you do something similar in MS Word 2010? I am trying to set up an MS Word web based application form (hopefully using the Form fields in Word then protecting via PDF) to capture initial information. Then, later on a second page, I wish to reference that primary information from the first page without having to manually do it.

How the heck is something like this done on MS Word 2010?

Kind regards and in anticipation

Wade
Reply With Quote
  #2  
Old 08-29-2012, 03:39 AM
Charles Kenyon Charles Kenyon is offline 'Linking' entered information to other "cells" from an original "cell" in MS Word Windows Vista 'Linking' entered information to other "cells" from an original "cell" in MS Word Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,081
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

There are a bunch of ways. I recommend reading through all of the following article to pick the one that will work best for you.
Repeating Data (Populating Multiple Like Fields)
Reply With Quote
  #3  
Old 08-30-2012, 01:13 AM
Wade Wade is offline 'Linking' entered information to other "cells" from an original "cell" in MS Word Windows 7 32bit 'Linking' entered information to other "cells" from an original "cell" in MS Word Office 2010 32bit
Novice
'Linking' entered information to other "cells" from an original "cell" in MS Word
 
Join Date: Aug 2012
Posts: 4
Wade is on a distinguished road
Default

Thanks Charles.
Reply With Quote
  #4  
Old 08-30-2012, 05:22 AM
Charles Kenyon Charles Kenyon is offline 'Linking' entered information to other "cells" from an original "cell" in MS Word Windows Vista 'Linking' entered information to other "cells" from an original "cell" in MS Word Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,081
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

You are welcome.
Reply With Quote
  #5  
Old 09-03-2012, 12:49 AM
Wade Wade is offline 'Linking' entered information to other "cells" from an original "cell" in MS Word Windows 7 32bit 'Linking' entered information to other "cells" from an original "cell" in MS Word Office 2010 32bit
Novice
'Linking' entered information to other "cells" from an original "cell" in MS Word
 
Join Date: Aug 2012
Posts: 4
Wade is on a distinguished road
Default How does one create extra data fields (if required) and Ref them later in a document

Hi Charles

Thanks again for the previous assitance.

I am now gearing up further in my form development - and am stuck!

I am wanting to use a drop down field to pick a pre-select number of possible replies. Depending upon which reply is chosen the form may then need to add new text AND a particular Form Field to be 'created automatically', if this makes sense? I want to then use the information supplied from this 'automatic selction' later on in the form (using Ref, or something else?).

How does one go about this? Is this beyond MS Word Form, and if so would I need to utilise other tools to do this?

Please find attached a 'mud-map' of what I tried to explain above. It may be of assistance? Maybe not!

The issues that I see as a challenge for me are how to set Bookmarks to unseen Text and/or Form Fields on a Form then somehow Ref these fields later on in the form. Makse sense?

Your help is greatly appreciated.

Kind regards and in anticipation,

Wade
Attached Files
File Type: pdf OnLineHelpQuestions.pdf (77.8 KB, 7 views)
Reply With Quote
  #6  
Old 09-03-2012, 04:51 AM
Charles Kenyon Charles Kenyon is offline 'Linking' entered information to other "cells" from an original "cell" in MS Word Windows Vista 'Linking' entered information to other "cells" from an original "cell" in MS Word Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,081
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Wade, this is much more challenging than your last question. There are two difficult questions. The first is how to have your form, itself, change based on whether or not a particular answer is picked in a drop down. The second is how to reference a formfield that may or maynot exist.

Let me deal with the first question. What follows is code that I have used for more than 10 years with a legacy form. It inserts a formfield at a bookmark if a checkbox is checked. You should be able to adapt it to a particular drop-down choice.

Note this was written for (and works with) legacy form fields in a form protected for filling in forms with a password.

If you are selling this, write to discuss a commission.

Code:
Public sPass
' Module and Project Written by Charles Kyle Kenyon
' May 2001, Copyright 2001 All rights reserved

Sub AutoNew()
    AutoOpen
End Sub

Sub AutoOpen()
    SetDocumentVariablePassword
    sPass = ActiveDocument.Variables("FormPassWord")
    LockDocForForms 'Lock this form so formfields will work
    GoToStartingField 'If set for particular case, goto witness info
End Sub

Private Sub LockDocForForms()
    'Locks Document or Template for Forms upon opening or creation
    If ActiveDocument.ProtectionType <> wdAllowOnlyFormFields Then
        ActiveDocument.Protect Type:=wdAllowOnlyFormFields, _
            NoReset:=True, Password:=sPass
    End If
End Sub

Private Sub GoToStartingField()
    ' Checks to see if form has been modified for a particular _
        defendant. If it has, then start with Witness name, _
        otherwise, start with County name
    If ActiveDocument.FormFields("DefName").Result = "DEFENDANT'S NAME?" Then
        ActiveDocument.FormFields("County").Select
    Else
        ActiveDocument.FormFields("WitName").Select
    End If
End Sub

Private Sub SetDocumentVariablePassword()
    Dim num As Integer, aVar As Variable
    For Each aVar In ActiveDocument.Variables
        If aVar.Name = "FormPassWord" Then num = aVar.Index 'End If
    Next aVar
    If num = 0 Then
        ActiveDocument.Variables.Add Name:="FormPassWord", Value:="GF126"
    Else
        ActiveDocument.Variables(num).Value = "GF126"
    End If
End Sub

Public Sub ProtectSubpoenaForForms()
    On Error GoTo NotSubpoena
    With ActiveDocument
        sPass = .Variables("FormPassWord") 'will trip error message if not set
        If .ProtectionType = wdNoProtection Then .Protect Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=sPass
            ' End If
    End With
    On Error GoTo 0
    End
NotSubpoena:
    MsgBox "This is not a subpoena form based on the right template!", vbExclamation, "Oh! Oh! Wrong Document for this macro!"
End Sub

Sub DucesTecum()
'
' DucesTecum Macro
' OnExit macro for DucesTecum Checkbox
' "&chr(10)&"Macro written 05/16/2001 by Charles Kyle Kenyon
'
    Dim strBringWith As String, rRange As Range
    With ActiveDocument
        UnProtectSubpoena  'subroutine below
        Set rRange = .Bookmarks("YouBringYes").Range
        'Save result of form field
        strBringWith = .FormFields("BringWhat").Result
        If .FormFields("chkDucesTecum").CheckBox.Value _
            = True Then
            .FormFields("DucesTecumTitle").TextInput.EditType _
                Type:=wdRegularText, Default:=" Duces Tecum "
            If strBringWith = "" Then strBringWith = _
                "Bring what?" 'End If
            .FormFields("BringWhat").TextInput.EditType _
                Type:=wdRegularText, Default:=strBringWith, _
                    Enabled:=True
            rRange.Font.DoubleStrikeThrough = False
            rRange.Font.Bold = True
            .FormFields("BringWhat").Select
        Else
            .FormFields("DucesTecumTitle").TextInput.EditType _
                Type:=wdRegularText, Default:=" ", Enabled:=False
            .FormFields("BringWhat").TextInput.EditType _
                Type:=wdRegularText, Default:="", Enabled:=False
            rRange.Font.DoubleStrikeThrough = True
            rRange.Font.Bold = False
            .FormFields("chkThirdParty").Select
        End If
        .Protect wdAllowOnlyFormFields, True, sPass
    End With
End Sub

Sub ThirdParty()
'
' ThirdParty Macro
' OnExit Macro for Third-Party Checkbox
' "&chr(10)&"Macro written 05/16/2001 by Charles Kyle Kenyon
'
    Dim rRange As Range
    With ActiveDocument
        UnProtectSubpoena 'subroutine below
        Set rRange = .Bookmarks("ThirdPartyLanguage").Range
        rRange.Font.DoubleStrikeThrough = _
            Not .FormFields("chkThirdParty").CheckBox.Value
        rRange.Font.Bold = _
            .FormFields("chkThirdParty").CheckBox.Value
        .Protect wdAllowOnlyFormFields, True, sPass
    End With
End Sub

Sub UnprotectSubpoenaForm() 'For Menu
    MsgBox "The password to unprotect this document is " _
        & ActiveDocument.Variables("FormPassWord") & "." & vbCrLf _
        & "You must use the same password if you reprotect it, otherwise the form will not work. Please write it down.", vbExclamation, "Subpoena Form Password Information"
    UnProtectSubpoena
End Sub

Private Sub UnProtectSubpoena() 'Subroutine for other procedures
    With ActiveDocument
        sPass = .Variables("FormPassWord")
        If .ProtectionType <> wdNoProtection Then .Unprotect (sPass)
        ' End If
    End With
End Sub
Write back when you have finished this part and we'll talk about using an IF field to reference a formfield that may not exist.
Reply With Quote
  #7  
Old 09-03-2012, 05:22 PM
Wade Wade is offline 'Linking' entered information to other &quot;cells&quot; from an original &quot;cell&quot; in MS Word Windows 7 32bit 'Linking' entered information to other &quot;cells&quot; from an original &quot;cell&quot; in MS Word Office 2010 32bit
Novice
'Linking' entered information to other &quot;cells&quot; from an original &quot;cell&quot; in MS Word
 
Join Date: Aug 2012
Posts: 4
Wade is on a distinguished road
Default

Hi Charles

Thanks for the code, but my coding experience is limited. I did some coding using a Pascal type language many years ago, but as much as I would like to learn the new syntax here my time is also limited.

I will take a step back and make the form simpler without as much 'smarts', so to speak.

Thanks for your help thus far.

Kind regards

Wade
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
'Linking' entered information to other &quot;cells&quot; from an original &quot;cell&quot; in MS Word Word 2003 "The information you were working on might be lost" constant error message rocketbeta Word 1 08-21-2012 02:54 PM
'Linking' entered information to other &quot;cells&quot; from an original &quot;cell&quot; in MS Word Issues with Word 2007: making "--" into "—" kg28 Word 1 02-04-2012 01:33 PM
PP hangs" "contacting the server for information" Mr_Canoehead PowerPoint 2 08-20-2011 07:58 PM
'Linking' entered information to other &quot;cells&quot; from an original &quot;cell&quot; in MS Word How to choose a "List" for certain "Heading" from "Modify" tool? Jamal NUMAN Word 2 07-03-2011 03:11 AM
'Linking' entered information to other &quot;cells&quot; from an original &quot;cell&quot; in MS Word How can I paste cell "A1" contents to cell "B1" if cell "A1" is not blank? Learner7 Excel 1 04-25-2011 04:39 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:21 AM.


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