Delphi HTML Clipboard Integration

Job ID: 39905997

Budget: €30 – €250 EUR

In my Delphi 10 VCL application I build an HTML document at runtime and save it to a file. What I still need is the code (or a small self-contained unit) that takes that generated HTML, puts it on the Windows clipboard in the correct CF_HTML format, and lets me paste it straight into the Gmail editor with all formatting intact.

The routine has to accept a file path or raw string, load the entire document as-is, package the required clipboard headers correctly, and push everything to the clipboard. If you know the quirks Gmail has with inline styles, meta tags, or DOCTYPE declarations, even better—I’m not yet sure which elements must stay untouched, so guidance on that would help.

Please deliver:
• Full Delphi 10–compatible source (no 3rd-party dependencies)
• A minimal demo form with one button: “Copy HTML”. Clicking it should leave the formatted HTML ready to paste into Gmail, Outlook, etc.
• Brief comments explaining each step, especially the header offsets and boundaries required by CF_HTML

I’ll compile and test on Windows 10; payment on confirmation that the Gmail composer shows the exact formatting.