@Function to export a document

I need to find an @function that programmatically does the same action as a document export. Does such an @function exists? I also need to find a function or method can find a link in the html source code that comes in a message. When I try to just go through the notesrichtextitem and pull out the body of the message, it doesn’t show the links.

Subject: Nevrmind I found it

Found it. @command([ExportFile];filetype;filename])