
Hi @DS-09011323-0,
There is no supported out-of-the-box functionality or Client API to directly copy or extract text from the Attachment Preview control UI. The preview pane renders content (often within an iframe) that is not accessible via the standard formContext or supported JavaScript methods.
Microsoft explicitly lists DOM manipulation (which would be required to "scrape" the preview pane) as an unsupported customization that may break with updates.
Supported Solution:
Instead of trying to read the preview pane, you should retrieve the file content programmatically using the Dataverse Web API.
Xrm.WebApi.retrieveMultipleRecords to query the activitymimeattachment table. You will need to filter by the objectid (the Email ID) to find the relevant attachment.body column, which contains the file content as a Base64 encoded string.pdf.js for client-side or OpenXML for server-side) to extract actual text from that binary data.