none
can i use 2 fields on a text lets say "[a]"??? RRS feed

  • Question

  • hi, i hve a big problem???]

    i hve a table in which i hve notes [a], [b], [c] etc....

    below z table i inserted a paragraph containing the same note and an explanation like this

    [a]    explanation

    [b]    explanation

    [c]    explanation

    the [a] i've inserted using SEQ fields

    i needed a way to navigate from the [a] in table to go to "[a]    explanation"

    when i posted on a forum sme1 give me z idea of using THe GOTOBUTTON of the insert field

    now my question is can i use another field on the [a] knowing zat i already hve a seq field on it???

    can sme1 plz help

    or give me another idea for navigating from [a] in table to go to "[a]    explanation"???

    thks :)

     

    forget to say :p

    am using visual studio 2010, word 2002 c#

    Thursday, December 9, 2010 11:17 AM

Answers

  • Yes, unfortunately inserting nested fields is not a completely straightforward process because you can't just use the regular { } characters to do it. I don't have .net code that would help with a nested insert and it would take me a while to put something together. Also, in Word 2002 there is no way to define it as a piece of WordProcessingML that you can insert using a range.

    However, you do not /have/ to do things this way, at least for the GOTOBUTTON code, where you can use e.g. (using my naming convention)

    [{ GOTOBUTTON tab1ref1 a }]

    or

    { GOTOBUTTON tab1ref1 [a] }

    for the first reference in table 1,

    [{ GOTOBUTTON tab1ref2 b }]

    or

    { GOTOBUTTON tab1ref2 [b] }

    for the second reference, and so on. In other words, you maintain the sequence numbers in your .NET code, not using SEQ fields. When it comes to the tablenotes themselves, you would probably avoid the field codes altogether and insert the text for note a as (say)

    [a]<tab>the text of the note...

    and create a bookmark called tab1ref1 that "covers" "[a]"



    Peter Jamieson
    • Marked as answer by Bessie Zhao Thursday, December 16, 2010 9:10 AM
    Tuesday, December 14, 2010 10:47 AM

All replies

  • Your question doesn't seem to make any sense. What do you mean by '2 fields on a text'? [a] is not a field it is an alphabetical sequence letter - perhaps inserted by Word's numbering.

    What you may be referring to is Outline numbering - see http://www.shaunakelly.com/word/numbering/outlinenumbering.html

    or possibly cross referencing - see http://gregmaxey.mvps.org/Repeating_Data.htm



    <StarMush> wrote in message news:8802133f-33ff-42fd-a2b4-c303580e57b4@communitybridge.codeplex.com...

    hi, i hve a big problem???]

    i hve a table in which i hve notes [a], [b], [c] etc....

    below z table i inserted a paragraph containing the same note and an explanation like this

    [a]    explanation

    [b]    explanation

    [c]    explanation

    the [a] i've inserted using SEQ fields

    i needed a way to navigate from the [a] in table to go to "[a] explanation"

    when i posted on a forum sme1 give me z idea of using THe GOTOBUTTON of the insert field

    now my question is can i use another field on the [a] knowing zat i already hve a seq field on it???

    can sme1 plz help

    or give me another idea for navigating from [a] in table to go to "[a] explanation"???

    thks :)




    forget to say :p

    am using visual studio 2010, word 2002 c#


    Graham Mayor - Word MVP
    www.gmayor.com
    Posted via the Communities Bridge
    http://communitybridge.codeplex.com/
    Thursday, December 9, 2010 12:38 PM
  • Let's call the texts ([a}, [b] etc. inside the table "tablenoterefs" and the references [a], [b] in the paragraphs below "tablenotes"

    To use a GOTOBUTTON, you need to specify a text for the button to display and the name of a bookmark. So your code could either create a bookmark the covers each tablenote, then insert that bookmark name inside the GOTOBUTTON filed, or you could do it all using fields, like this:

     a. at the beginning of each table with notes, put 

    { SEQ t \h }{ SEQ r \r0\h }

     b. For each tablenoteref, use the nested field

    { GOTOBUTTON "tab{ SEQ t \c }ref{ SEQ r }" [{ SEQ r \c \*alphabetic }] }

     c. after each table with notes, put

    { SEQ r\0\h }

     d. For each tablenote, use the nested field

    { QUOTE "{ SET "tab{ SEQ t \c }ref{ SEQ r }" 1 }[{ SEQ r \c \*alphabetic }] }

     e. Ensure all the fields are updated before the user sees the document.


    Peter Jamieson
    Thursday, December 9, 2010 4:01 PM
  • hi Peter thks 4 replying

    am stuck wiz another bug 4 z time being will solve it 1st then try wat u said

    will let u knw if its ok after i tried

    thks once again

    :)

    Friday, December 10, 2010 9:38 AM
  • hi peter,

    i am trying wat u said but am gettiing confused

    here is the seq field to which i want to add a GoToButton field

    Field f = app.Selection.Fields.Add(app.Selection.Range, WdFieldType.wdFieldEmpty, "SEQ " + sBkMk + " \\* alphabetic", true);

     app.Selection.Fields.Add(app.Selection.Range, WdFieldType.wdFieldEmpty, "GOTOBUTTON " + sTableNoteBkMk +  " {" + f.Code.Text + "}", true);

    wat i thought it would give me was

    in code :

    [{GOTOBUTTON CTDTablenote001_1 {SEQ CTDTable001 \\* albpabetic \* MERGEFORMAT} \* MERGEFORMAT}]

    n in z table i would get an  [a], n when i click on it i get to the tablenote below table where the bookmark is

    is there anyway to do zat???

    or plz Peter help me correct wat am trying to do???

    can sme1 plz help

    thks in advance :)

    Tuesday, December 14, 2010 7:16 AM
  • Yes, unfortunately inserting nested fields is not a completely straightforward process because you can't just use the regular { } characters to do it. I don't have .net code that would help with a nested insert and it would take me a while to put something together. Also, in Word 2002 there is no way to define it as a piece of WordProcessingML that you can insert using a range.

    However, you do not /have/ to do things this way, at least for the GOTOBUTTON code, where you can use e.g. (using my naming convention)

    [{ GOTOBUTTON tab1ref1 a }]

    or

    { GOTOBUTTON tab1ref1 [a] }

    for the first reference in table 1,

    [{ GOTOBUTTON tab1ref2 b }]

    or

    { GOTOBUTTON tab1ref2 [b] }

    for the second reference, and so on. In other words, you maintain the sequence numbers in your .NET code, not using SEQ fields. When it comes to the tablenotes themselves, you would probably avoid the field codes altogether and insert the text for note a as (say)

    [a]<tab>the text of the note...

    and create a bookmark called tab1ref1 that "covers" "[a]"



    Peter Jamieson
    • Marked as answer by Bessie Zhao Thursday, December 16, 2010 9:10 AM
    Tuesday, December 14, 2010 10:47 AM