I have an old database holding lots of doclinks. Unfortunately at some point the database was COPIED and as a result the documents all have new UNIDs and the doclinks are failing.
The documents seem to follow a pattern of :
document title unique-document-number
similar to below
- Water Pore Volume( SPM 237A) WIBR-0076
Many of the documents have dozens of these doclinks and their descriptive text in the body field.
I have not spent much time working with RichTextItems so I am unfamiliar with its capabilities. Is it possible to get a doclink and then get the text which immediately follows?
If so, then I could go to the view which organizes by unique-document-number and get the UniversalID and then update the doclink.
I considered using FindFirstString in conjunction with FindFirstElement(RTELEM_TYPE_DOCLINK) and then FindNextString and FindNextElement, but this would rely on a coincidence and could get off-track if a doclink was missing.
My preference is to find the doclink, then look at the next 10 characters to see if it matches my pattern (they all will be “WIBR-” followed by 4 numerals). If no match, then I get the next doclink.
Before I spend much time on this I wanted to ask for opinions on whether it is possible.
Another option is to stick with FindFirstString and each time I found a matching string, create a Hotspot around it. Is this possible?
Thanks,
Marc