W
WonderingAimlessly
Yes, I have run into this and have a solution that may or may not work for you. But first, I wanted to mention that I found this problem when working in Word 2000, but now in Word 2003, something has changed. ON the surface it appears to be that MS fixed the discrepancy between the indices. But, now that I have read you comment, it looks like Word 2003 is not fixed after all.
So, back to my solution. After posting a dialog for the user to select a heading, I found the paragraph index related to the heading selected (destination of xref), then found the paragraph index related to source location where the xref will be inserted. If the source location is before the destination, then I verified how many bulleted items where in the document prior to the destination, then I added that many bulleted items to the index of the destination para index number passing that number to the insert xref statement. I have had to make a few minor tweaks along the way, but it was perfected when using Word 2000. Now that we started to migrate to Word 2003, the whole game starts over again. Hopefully this help get you started. And if you discover anything new, please post.
A Womand Told Me
http://www.awomantoldme.com
So, back to my solution. After posting a dialog for the user to select a heading, I found the paragraph index related to the heading selected (destination of xref), then found the paragraph index related to source location where the xref will be inserted. If the source location is before the destination, then I verified how many bulleted items where in the document prior to the destination, then I added that many bulleted items to the index of the destination para index number passing that number to the insert xref statement. I have had to make a few minor tweaks along the way, but it was perfected when using Word 2000. Now that we started to migrate to Word 2003, the whole game starts over again. Hopefully this help get you started. And if you discover anything new, please post.
A Womand Told Me
http://www.awomantoldme.com