• Using ListNum field (WinXP/OXP)

    Author
    Topic
    #396724

    I have developed a reporting format that uses macros to insert information into the report. It also inserts, as required, Corrective Action Requests (CARs) where our staff find some aspect within the organisation being audited that does not meet the required standards. Inserting the CAR forms is the easy bit. To be able individually identify the CARs they are numbered. To achieve this I have used the Word ListNum field. This works fine and numbers the CARs sequentially, although using the Outline numbering which I do not like as it puts a parenthesis after the number.

    Our staff also have a requirement to move the CARs within the report (shuffle them). The ListNum field handles this as well by renumbering the CARs as they are moved. Very smart!

    How do I assign the contents of an enclosed bookmark to a variable? The problem I have is that I wish to automate the process further by having the system check for the total number of CARs and insert that number, if it is more than 1, at a bookmark within the report as well as adding varying text, using autotext, when the total number is 1.

    Cheers

    Viewing 1 reply thread
    Author
    Replies
    • #745563

      Did you want to read the contents of a bookmark into a variable or write the contents of a variable into a bookmark? or both?

      For the first, this thread is sort of relevant (it fetches the text between two bookmarks).

      For the second, the code in the attachment to post 271050 might be useful.

      Does this help??

      Also, I think you might be able to add a switch to your ListNum field to change the format, but I haven’t looked it up.

      • #746218

        Jay thanks for that

        Having looked at the code in your example, Demo 2, I decided to come at it form a different angle. Instead of trying check to see how many CARs had been added I have asked, through an input box, how many have been added then use the input variable in 3 IF statements to decide what to put in the report.

        Thanks again

        Phil C

      • #746219

        Jay thanks for that

        Having looked at the code in your example, Demo 2, I decided to come at it form a different angle. Instead of trying check to see how many CARs had been added I have asked, through an input box, how many have been added then use the input variable in 3 IF statements to decide what to put in the report.

        Thanks again

        Phil C

    • #745564

      Did you want to read the contents of a bookmark into a variable or write the contents of a variable into a bookmark? or both?

      For the first, this thread is sort of relevant (it fetches the text between two bookmarks).

      For the second, the code in the attachment to post 271050 might be useful.

      Does this help??

      Also, I think you might be able to add a switch to your ListNum field to change the format, but I haven’t looked it up.

    Viewing 1 reply thread
    Reply To: Using ListNum field (WinXP/OXP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: