Results 1 to 12 of 12
  1. #1
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Table Cell Field

    Is there a way to reference a cell's value using a Word 97 sr-2 field code?

    I want to replicate the text in one cell to every cell below it. I can do it with VBA code, but was hoping to accomplish it (from the user's point point of view, anyway) by simply updating the fields.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: Table Cell Field

    Kevin,

    this one's pretty easy, if I understand what you want.

    1. create a bookmark for the value of the cell to be copied to other cells: select the value in the cell first and then go thru the Insert | Bookmark dialog. The value of the bookmark is now the selected value.

    2. create cross-refs to the bookmark in the other cells: go thru the Insert | Cross Reference dialog. Choose the Ref type drop-down as bookmark and the Insert Reference To drop-down as Bookmark Text.

    You're done.

    When updating the orig cell, just be careful not to delete the bookmark. For example, if replacing the entire original text, do NOT select it all and hit delete. Select one character less than the entire bookmark, overtype that with the new value and then delete the leftover character from the original.

    As always, select and update fields with F9.

    If not a bother, it might be useful to turn on View Bookmarks (a checkbox under the Tools | Options dialog). This puts what appears to be square brackets (but not as entered on the keyboard) around the bookmark's value.

    The above is independent of where the original text and the refs are within the doc (eg, original text could be in some para, one ref could be in a table cell, another ref could be in another para). Not sure if the independence will hold for text boxes.

    HTH.
    Fred

  3. #3
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Table Cell Field

    Fred,

    Great minds think alike (your suggestion is exactly what I tried first!) but alas, great minds also need to think some more because...

    I discovered that the user is not the least bit concerned about accidentally deleting the bookmark when entering text into the original cell. So, need another way.

    Thanks for responding. Got lots of lookers, but you were the only one with an idea. Thanks again. Try again!
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  4. #4
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: Table Cell Field

    Kevin,

    That wasn't in your original rqmts.

    With that in mind, you might want to try incorporating the ASK field. That is a field that, when updated, provides a dialog box for data entry. The ASK field allows a bookmark to be defined which will contain the result of the data entry. Now cross-reference the bookmark in your table, as before, and you should be set.

    Fred

  5. #5
    BAM
    Guest

    Re: Table Cell Field

    Hi Kevin,

    If you select the entire cell and add the Bookmark then it shouldn't be deleted. Now if you select text in the cell and add the Bookmark, then it will be deleted.
    ~~~~~~~~~~~~~~~~~
    Cheers!

  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Table Cell Field

    I'll give that a try. Sounds promising...
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  7. #7
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Table Cell Field

    Fred,

    Sorry about the org requirements. I often forget to mention what provoked the post in the first place.

    I'll try the ASK after trying what BAM suggests. Thanks.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  8. #8
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: Table Cell Field

    Kevin,

    No problem about the original rqmts. I get "feature creep" from clients all the time.

    I saw BAM's suggestion and tried it since I never thought of bookmarking the entire cell. But you may not like the result if you're working in Word 2000.

    Your rqmts did mention that the cross-ref would be in another cell in the table. So I bookmarked a cell in a table and added some text. I then cross-ref'd the bookmark in another cell. What I got was a 1-cell table WITHIN the cell where the cross-ref was placed. Word 2000 allows tables within tables.

    I also tried a cross-ref outside the table. This also created a 1-cell table along with the text.

    Of course, in both cases, you can turn off the cell border of the cross-ref. But you still see the guidelines.

    Be curious to know what you end up doing.

    Fred

  9. #9
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Table Cell Field

    Well, here's the answer:

    (For testing assume a table with just one column and 4 rows. All cells in the column must contain the same text when the operation is finished)

    1. In cell A1, insert an ASK field code with bookmark named Applicant:
    { ASK Applicant "Enter the Applicant Name: " }
    2. Also in cell A1, put a reference to the Applicant bookmark:
    { REF Applicant }
    3. In cells A2 thru A4 put refs to Applicant.

    Save and close doc; open doc. At prompt type in Applicant name. Viola! All cells display that text.

    I consider this a work around because I would rather not have to prompt the user for the contents of the column. The actual table has 10 or so more columns none of which will be prompt for.

    One new discovery for me: the ASK field creates the Applicant bookmark.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  10. #10
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Table Cell Field

    Charles,

    Thanks for your input. I discovered via testing what you relate re: directly referencing a cell if the contents of the cell is a number. That was EXACTLY what I was looking for EXCEPT for the fact the contents of the cells in question contain TEXT!

    I noticed too, the next item you relate: in essence, if I copy text from a cell (and the cell marker is also selected) to a non-table location of a document, the result of the paste operation is a new one-cell table -- not what I was looking for.

    I've downloaded your tutorial on ASK. Thanks...
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  11. #11
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Table Cell Field

    Hi Kevin,

    You may want to download the ASK Field and UserForm tutorials from <A target="_blank" HREF=http://www.addbalance.com/word/download/index.htm#Tutorials> my download page</A> (addbalance.com/word/download/index.htm).
    Charles Kyle Kenyon
    Madison, Wisconsin

  12. #12
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Table Cell Field

    The end of cell marker will cause problems though, especially with calculations.

    If the contents are numbers, you can simply refer to the cell by name: a1 c15, etc. { = a3 } A cell with text will return a 0 as the value, though.

    If a reference is made (outside of the table) to a bookmark containing an end-of-cell marker, the result will be a table cell.

    (edited 6-28 to correct links in signature)
    Charles Kyle Kenyon
    Madison, Wisconsin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •