I think I recognized the issue with the Share menu.
The Share menu does work to share Rich Text files, Markdown files, and some other types but does not share PDF files, HTML files, and many others to OmniFocus.
I am guessing that the types of files which OmniFocus accepts via Share is set by the OmniFocus developers and I cannot change it. Correct? Or is there some other trick I can use to change that behavior?
I think we’re deviating here (or splitting into 2 issues) . . .
I wanted to create a task in OmniFocus linked to a document in DEVONthink. I now know that I can do that using a script from the DEVONthink Scripts folder Reminders called Add as To Do to OmniFocus. This does get labeled as a Reminder but I could change that by editing the script. This puts a task into the OmniFocus Inbox with an attachment linked to the document in DEVONthink. That solves my problem.
The second issue (which I’m less concerned about) is being able to add a document to OmniFocus but not as a task - maybe just to add it as a supporting document. That could be accomplished by selecting the document in DEVONthink and doing a Copy Item Link and finally pasting that link into OmniFocus as an attachment.
Sharing to OmniFocus on the Share Menu in DEVONthink doesn’t seem to create a task in OmniFocus whereas to Reminders does. Maybe this is an OmniFocus issue rather than a DEVONthink one?
I only have an expired trial of OF but it does let me post a task from the Share menu in DEVONthink. However, for it is using the file URL, i.e., the file path from the Finder. That isn’t a good idea – either in this context or in almost every other I can think of – as the path could change.
However, the script we provide should make a proper task with an item link.
Also, commands in the Share menu are context-sensitive. This avoids displaying menus overloaded with unrelated commands. As OF doesn’t appear in the Share menu for Preview, that’s a question they would have to answer.
Sorry–I assumed the OP was asking about ways to communicate between DTP and OF rather than strictly limiting question to “Share” menu. This assumption appears to have been supported by OP in response to my question, but I’ll try to break the code on acceptable responses from here on out.