Latest Microsft patch for 2003 breaks existing behaviour

A

Adrian Leeming

Okay I have a problem with the lastest patch for Word 2003 patching to
version 11.8134.8132.

Microsoft have broken the way insert cross references works and I wonder is
anyone has a way round it. The problem occurs on documents that have a
mixture of pargraphs numbered with both an outline set of legal numbers and
some bulleted paragraphs (the bullets are in a different outline set) in
between the numbers. Then we try to xreference a paragraph that is after a
mixture of numbered and bulleted paragraphs.

I calculate and insert cross references to some numbered paragraphs all in
code with no user dialog for various reasons. Normally you can determine the
paragraph index that a cross refrence should be inserted as by having a range
from the start of the document to the numbered paragraphs range.

e.g

Set lRange = rngSrc.Duplicate
lRange.Start = 0
ReferenceItemNo = lRange.ListFormat.CountNumberedItems

now using the count of numbered items you can insert a xref

lRange.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdNumberRelativeContext,
ReferenceItem:=ReferenceItemNo, InsertAsHyperLink:= _
True, IncludePosition:=False


there has been an interesting oddity for a while that if you where to
calculate the paragraph number withought all the bulleted paragraphs in and
use that as the ReferenceItem it also comes out as the same paragraph.

e.g for a document that looks like between the dashes
------------------------------
1. a numbered paragraph
* bulleted paragraph
* bulleted paragraph
2. another number paragraph
* bulleted paragraph
3. another numbered paragraph
4. another numbered paragraph
Insert xref here

----------------
you can insert an Xref with a ReferenceItem of 7 or 4 and get the Xref to
the paragraph numbered 4. After the path only 4 works and how do you
calculate that given that you cannot always look at the numbering type of a
paragraph as it may contain listnums so have 2 and sometimes just has a value
of nothing even though the paragraphs are numbered

I cannot use the GetCrossReferenceItems as that just gives a list of
strings and matching those up with whatever paragraph I am using as target
could be fun as you can bet the paragraph.range.text will not match and you
need the number to be sure.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top