• index for multiple documents (Word 2000 SP3)

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » index for multiple documents (Word 2000 SP3)

    Author
    Topic
    #430409

    I’m creating a combined index for 100 existing documents using RD fields.

    I have been told that I can use the Title field of File>Properties instead of the page number in my index. I don’t know how.
    Can someone please advise me?
    Thanks in advance.
    Regards,
    Judith

    Viewing 0 reply threads
    Author
    Replies
    • #1005063

      Hi Judith,

      You don’t want a page number at all? Or you want the Title property to appear with a page number next to it?

      If the latter, your could try this — Insert a Doc Property field referencing the Title property into your documents, then mark it as an index entry. The Title of your document will appear in your Index (as well as in the document…) followed by the page number the index field is on. There doesn’t seem to be a way to get the RD code to directly query a document’s Title property…

      There may be a more clever way to do this, but does this shed any light at all?

      Kim

      • #1005147

        Kim,
        Thanks for your reply.
        I have a hundred lessons. What I really want is a simple way to combine the indexes of these 100 lessons to answer such questions as “Which lesson covers multi-meters?”
        If I can have the page number as well as the document name, so much the better, but the document name will be enough.
        Regards,

        • #1005175

          Judith,

          I think I understand what you want… something like this? (Pardon my index entries, I’m just hungry.)

          Candied Yams, Thanksgiving Dinner Made Easy, 4
          Dill Pickles, Summer Delights, 17
          Garlic Mashed Potatoes, Thanksgiving Dinner Made Easy, 12

          …and so on? The first item is the item from the index of the individual lesson. The second is the title of the lesson and the third is the page number. If so, I’m not sure the RD field can get you there.

          VBA could probably be teased into cycling through the each document, grabbing the existing Index, converting it to text and manipulating each entry to include the name of the lesson whence it came. Once done with all the indices, it would then pull them all together and sort alphabetically, so you could look up multi-meters and find the lesson to which it belongs. drop

          If so, are you comfy with VBA? I’ll doodle with it a little and see if I’m on the right track. And maybe someone else has a better and/or simpler idea?

          Best, Kim

          • #1005180

            Kim,
            That’s exactly right. You’ve understood exactly. I’ve had programming experience in other languages but not a lot in VBA.

            I’ve been trying to make my index by using Folio-by-Chapter numbering eg
            Candied Yams…….Thanksgiving Dinner Made Easy-4
            Dill Pickles……..Summer Delights-17
            Garlic Mashed Potatoes…….Thanksgiving Dinner Made Easy-12

            I have a naming convention that I use for the lessons. If I can institute this as the “Chapter” number, I might be able to create an index like
            Candied Yams…………TDME-4
            Dill Pickles………………..SD-17
            Garlic Mashed Potatoes……………TDME-12

            using RD fields it currently comes out as:
            Candied Yams…………………………..4
            Dill Pickles………………………………..17
            Garlic Mashed Potatoes…………..12

            Thanks again,

            • #1005287

              Hi Judith,

              I threw this together (with an emphasis on “threw”). I’m sure it’s not as well-constructed as it could be from a VBA standpoint, but it compiled an index for me from three documents. I have attached the code in a text file. Copy and paste it into your normal or other global template.

              This code assumes four things: 1) your lessons are all in one folder, 2) you have an *empty* document named “Master Index.doc” in a different folder (the code could have created a document, but I started it this way first and, well…) 3) the lesson name (or code) you want inserted into your entries is in each document’s Title document property field, and 4) that every lesson has an index. At this point, if a lesson does not have an index, you will get an error message and the process will stop.

              Remember to change the code to reflect your folders.

              I was successful in my limited testing, but let me know if it works/doesn’t work, or you don’t understand something I’ve done.

              Thanks to HansV for the structure of rolling through all documents in a folder!

              Best, Kim

            • #1005552

              Kim,
              thanks for the macro. What a lot of work you did for a stranger.
              I changed the file names and paths as you suggested, put my code names for the documents in the Properties title and ran the macro.
              It worked really well.

              The index has come out as a single column not two columns. Because of the file names in the page numbers, I’m going to leave it as single column and extend the macro to replace the style Index 1 with a new style Index Master which will have the tab at 15cm and will remove the direct formatted tab at 7cm and the directly applied US English.
              And I’ll also remove all the remnant section breaks.

              I’ll repost the macro later in case anyone else is interested.
              I have only one unsolved problem: multi-level index entries. They are split up by the sort. If I can find a way to identify them in VBA, I might convert them to single level entries.

              here is a sample of the combined index. It’s certainly what we need. Thanks again.
              Backbone cable …………….. L3M1L3-36
              Bit ……………………………….. L3M1L1-24, 39
              BNC connector ……………….. L3M1L3-66
              Bridge ………………………………. L3M1L3-45
              Browsers …………………………… L3M1L2-22
              Bus …………………………………… L3M1L1-33

            • #1005558

              Judith,

              You’re welcome. I sometimes get so interested by a challenge that I just do it to see if/how I can do it. I’m very glad if it got you most of the way there. I would surely like to see your final solution.

              Best, Kim

    Viewing 0 reply threads
    Reply To: index for multiple documents (Word 2000 SP3)

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

    Your information: