Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Jul 2001
    Location
    Wisconsin, USA
    Posts
    193
    Thanks
    0
    Thanked 1 Time in 1 Post

    Table of Contents across Multiple Docs (Word 2000 SR-1)

    I have a folder with 15+ documents in it, one of which is a table of contents. Is it possible to put reference(s) in the TOC that references all other docs within that folder? I have tried using RD with some success; however, the amount of files to be listed in the TOC can range anywhere from 15-100. My master TOC has many listings which is shortened up as to the actual documents that are needed for that particular project.

    Is what I'm looking for possible?

  2. #2
    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 of Contents across Multiple Docs (Word 2000 SR-1)

    Hi Leanne,

    So far as I know... the RD field is the only reliable way to do what you are attempting.

    You may want to take a look at the Tech Tav template referenced on my <A target="_blank" HREF=http://www.addbalance.com/word/masterdocuments.htm> Master Documents</A> page.
    Charles Kyle Kenyon
    Madison, Wisconsin

  3. #3
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Table of Contents across Multiple Docs (Word 2000 SR-1)

    You may need a macro to build the list of RD fields from every file in the current directory. It would look something like this
    <pre>Sub temp1()
    Dim i As Integer
    With Application.FileSearch
    .LookIn = ActiveDocument.Path
    .FileName = "*.doc"
    .SearchSubFolders = False
    .Execute
    If .FoundFiles.count > 0 Then
    For i = 1 To .FoundFiles.count
    If .FoundFiles(i) <> ActiveDocument.FullName Then
    Selection.Collapse Direction:=wdCollapseEnd
    Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
    text:= "RD f " & Chr(34) & .FoundFiles(i) & Chr(34), _
    PreserveFormatting:=False
    Selection.TypeParagraph
    End If
    Next i
    End If
    End With
    With Selection.Find
    .ClearFormatting
    .Forward = True
    .Wrap = wdFindContinue
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    .text = ActiveDocument.Path & Application.PathSeparator
    .Replacement.text = ""
    .Execute Replace:=wdReplaceAll
    End With
    ActiveDocument.Fields.Update
    End Sub</pre>

    Andrew Lockton, Chrysalis Design, Melbourne Australia

  4. #4
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    UK
    Posts
    239
    Thanks
    4
    Thanked 1 Time in 1 Post

    Re: Table of Contents across Multiple Docs (Word 2000 SR-1)

    I would like to ask an associated question.
    As far as I can see, if you insert a TOC field followed by RD fields for say three documents, you get one TOC for all three.
    What I want to be able to do is have a paragraph describing a document, then the TOC for that document, then a paragraph describing the next document followed by its TOC and so on.
    If you type the overview, insert the TOC and an RD for that doc, then do the same for the next etc, when you have finished each TOC is for all three docs.
    I have hacked around and cannot find out how to set this up.
    Is it possible please?
    By the way, thanks for pointing to Tech Tav. Found a couple of macros there that are really useful to me.
    Peter Grainge

Posting Permissions

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