In an Editbox you can have hyperlinks, but it has several downsides:
1. _VFP.EditorOptions has to include a "k" or "K", see the help topic on it, don't just set _VFP.EditorOptions to "k" only, then you also switch off some very natural and necessary editor behaviours.
2. The Editbox and Textbox have the EnableHyperlinks property, which then works, when the general _VFP.EditorOptions works.
So far the preparations, of course the first downside is that this feature is quite hidden. But then you now haven't turned your editbox into a browser canvas. If you write out a link like [tt]<a href=targetURL>here</a>[/tt] this doesn't just display "here" in the underlined Hyperlink style. You can write URLs straight as they are into the EditBox value and VFP will detect them and make them active Hyperlinks, the display text stays the link URL. So this works quite like URLs work in many mail clients (even in text only mails) and like this forum works.
Now you can have URLs with file:// prefix pointing to files in the LAN, but that's it, you can't have the text display "here" and the document URL hidden as meta info.
Besides that, links then work as they work in mails. From the perspective of full control over events the downside is, the links just cause the usual OS behaviour to start up the standard browser (in case of http URLs) or the mail client with mailto: URLs and I just checked and see Word is started from file:// URLs of docx files.
But your Editbox.Click event code isn't run, so you only get what those URLs do by themselves, eg a file URL of a PDF would display the PDF in the standard PDF reader, likely, or in the standard browser. If the documents you're talking about are something specific to your application and you want a form of your application to come up with the document to (interactively) display, allow to edit and store changes in a database, that doesn't work out. If you're fine with Word starting up outside of your control and the user just doing anything he likes with the documents, which indeed means he can edit it, no problem, but also store the modification somewhere else without the link in your RTF changing accordingly. You get no feedback.
You could use a webbrowser control and obviously display any text including links, you then even get an event triggered by the link click in which you can allow the standard behaviour or do anything you'd like the link to cause. The task pane makes use of that and its source code also is available.
RTF control is maybe the simplest compromise, as in itself it allows not only colored text and other mixed text formattings but also hyperlinks, you just again have no control about what link clicks cause and you're not informed with feedback. Also users can modify text in an RTF control, but in itself it doesn't have a context menu allowing to format a selection as bold or add a URL, mainly the RTF control is the canvas of Word in RTF mode lacking the usual toolbars and context menu.
Bye, Olaf.
Olaf Doschke Software Engineering