I have a bunch of urls/hotspots pointing to files for download. I have to replace a url domain from 'www.company.com' to 'xyz.company.com'. I wrote the following agent to do this:
doc.DT2Build_File_bu = doc.DT2Build_File
Set rtfld = doc.Getfirstitem("DT2Build_File")
Set RTRange = rtfld.Createrange()
numReplaced = RTRange.Findandreplace("www.company.com", "xyz.company.com", 16)
Call doc.save(True, False)
This works in that the domain is properly updated but I found that often (tho, not always), the hotspot is changed. So instead of the rest of the url (containing the location and filename) is no longer a hotspot -- the only part that's a hotspot is now just the domain -- the part I replaced with this code. Is there another way to do this that preserves the entire hotspot? Thank Clem