Re: Word Index entry limitations?



Actually, it was Duane Hookom who created the code.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Deidre" <Deidre@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0237F6E5-49D1-43DB-945F-B49056D8B2E7@xxxxxxxxxxxxxxxx
Thanks for the great post, Doug. You must know something about genealogy.
However, the code is probably much simpler than your example. The index
I'm
creating will not need anything other than Word's normal indexing style,
with
the exception of a volume number prefix before each page. The entire
format
will be surname (topic), indented first name (subtopic), followed by
vol/page#s. There are a few "see" references, but they are handled all
right
in the topic line. There are no vol/page#s after the topic/surname - every
surname has at least one first name entry - and no family ids to worry
about.

I believe I can figure out how to take out the stuff I don't need from
your
code. I really appreciate it. If you need any genealogy help, let me know.
:-)

"Doug Robbins - Word MVP" wrote:

It seems to me that moving the index to a database might be the thing to
do
and then make use of the following concatenate function:

Option Compare Database

Function Concatenate(pstrSQL As String, _
Optional pstrDelim As String = ", ") _
As String
'Created by Duane Hookom, 2003
'this code may be included in any application/mdb providing
' this statement is left intact
'example
'tblFamily with FamID as numeric primary key
'tblFamMem with FamID, FirstName, DOB,...
'return a comma separated list of FirstNames
'for a FamID
' John, Mary, Susan
'in a Query
'SELECT FamID,
'Concatenate("SELECT FirstName FROM tblFamMem
' WHERE FamID =" & [FamID]) as FirstNames
'FROM tblFamily
'

'======For DAO uncomment next 4 lines=======
'====== comment out ADO below =======
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset(pstrSQL)

'======For ADO uncomment next two lines=====
'====== comment out DAO above ======
'Dim rs As New ADODB.Recordset
'rs.Open pstrSQL, CurrentProject.Connection, _
adOpenKeyset, adLockOptimistic
Dim strConcat As String 'build return string
With rs
If Not .EOF Then
.MoveFirst
Do While Not .EOF
strConcat = strConcat & _
.Fields(0) & pstrDelim
.MoveNext
Loop
End If
.Close
End With
Set rs = Nothing
'====== uncomment next line for DAO ========
'Set db = Nothing
If Len(strConcat) > 0 Then
strConcat = Left(strConcat, _
Len(strConcat) - Len(pstrDelim))
End If
Concatenate = strConcat
End Function


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Deidre" <Deidre@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:655ED35A-44BB-41EA-B353-B3C237A1EC15@xxxxxxxxxxxxxxxx
Thanks for your quick reply, Jay. The answer to (1) kind of rules out
using
the Word index program as a solution to (2), though. There are over
150,000
{XE} entries in just the first 23 volumes. Upgrading to 2007 is not an
option
right now.

Plan B is to read the generated Word indexes into a db table with
fields
for
surname, firstname, see_names, and page(s). The volume number will be
added
manually for each volume index file. My books are used to research
people
mentioned in old family Bibles, wills, etc., so only the names are
indexed;
surnames are topics, first names are subtopics. After I manually add
the
volume number, I'll append the table to a master table that contains
all
volumes. By sorting the resulting master table I can easily generate an
index
like this:

SMITH
John Vol 2:1
John Vol 15:14-16, 3

but I need to somehow merge all the John Smiths into one line,
something
like this:

SMITH
John Vol 2:1; Vol 15:14-16, 3

I can do that, but I think there may be a better solution than writing
code
to search the table for all the volumes and page numbers for Smith,
John,
output that record to another table, skip to the next record after the
last
Smith, John (the names will be sorted alphabetically already) and
repeat
the
process for all 200,000 entries.

Where should I move this topic to find help such as this? I have VFP8,
and
Access, as part of Office Pro 2003, and can use the VBA that comes with
it.

Thanks again.




"Jay Freedman" wrote:

Deidre wrote:
1. What is the maximum number of index entries allowed in a Word
2003
document?

2. I abstract historical microfilm to book form. Each volume - about
200 pgs - has its own index. I am up to Volume 24 and some customers
would like an index that spans all volumes. I see from other posts
that a multi-document approach is out.

I would like to publish this compiled index on my web site, also. I
was an applications programmer for 20 years, so I can use most of
the
studio tools, but its been awhile. I could use some help, especially
with the newer 3
letter words.

Thank you

I don't see any documented limit specifically on the number of index
entries
per document. According to http://support.microsoft.com/?kbid=211489,
Word
versions up to 2003 are limited to 32000 fields of any kind per
document,
while in Word 2007 that's raised to over 2 billion. It doesn't say
whether
the INDEX field that displays the entries has some smaller limit.

A multi-document approach is not necessarily out of contention. If you
create a separate document and insert RD fields in it to point to the
others, and then an INDEX field, it will pull entries from all the
referenced documents. You would have to manage the page number starts
in
the
other documents, though, so they were all consecutive -- I don't think
there's any way to get the RD field to specify a volume number to the
INDEX
field.

Once the index is complete, you should be able to just save it as a
web
page
(use the "Web Page, Filtered" choice in the Save As dialog to reduce
the
Word-specific HTML coding to a minimum).

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup
so
all may benefit.








.



Relevant Pages

  • Re: Word Index entry limitations?
    ... ' John, Mary, Susan ... Dim rs As DAO.Recordset ... Dim strConcat As String 'build return string ... process for all 200,000 entries. ...
    (microsoft.public.word.vba.general)
  • Re: Word Index entry limitations?
    ... ' John, Mary, Susan ... Dim rs As DAO.Recordset ... Dim strConcat As String 'build return string ... process for all 200,000 entries. ...
    (microsoft.public.word.vba.general)
  • Re: Compassion simplified (was Re: Lawyers simplified)
    ... agree with that opinion, however even I know limits and have told my ... presence in RAB for more than eight years. ... No surprise at all, John. ... to THAT newsgroup was met by an icy wall of silence, ...
    (misc.fitness.weights)
  • Compassion simplified (was Re: Lawyers simplified)
    ... agree with that opinion, however even I know limits and have told my ... presence in RAB for more than eight years. ... No surprise at all, John. ... to THAT newsgroup was met by an icy wall of silence, ...
    (misc.fitness.weights)
  • Re: Lottery Strategies
    ... RGL Gremlin aka "John Griffin" wrote.. ... You alone have destroyed this Newsgroup with the most repetitive, ... A sampling of the posting history of giant bimbo Sherry ... "I said 'the only way,' bimbos. ...
    (rec.gambling.lottery)