How to replace a file attachment (or doclink) in notes document with a URL?

How to replace a file attachment (or doclink) in notes document with a URL?Hi, in my notes document, I have more than one doclinks and attachments, I want to convert them to a URL as docID + filename format,

This link helps, http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/7cf6bd7c4717f48b8525788500673ac3?OpenDocument

but it does not work, my issue is how to replace the doclink or file attachment icon with a URL format? in that example, by using FindAndReplace of notesrichtextrange , I can not find the location of doclink or file attachment, any idea?