Paste from Word and Outlook

    Let users bring Office content into an Avalonia document through the editor clipboard workflow. Automatic Office detection and the explicit Word-paste command use the shared HTML cleaner.

    The host can inspect incoming HTML through the synchronous Pasting event before it enters the document.

    Formatted content pasted from Word into the Avalonia editor, retaining a heading, table and embedded landscape image.
    Formatted content pasted from Word into the Avalonia editor, retaining a heading, table and embedded landscape image.

    Use it in your application

    Keep AutoDetectWordPaste enabled for normal paste when Office cleanup is required. Use the explicit command when the application already knows that the clipboard came from Word.

    Run clipboard operations on the UI thread after readiness, with a writable editor. Clipboard availability, image access and Remote Desktop redirection depend on the deployment environment.

    Treat pasted content as input. Apply any application-specific policy before storing or sending it; keep the editor resource policy aligned with your workflow.

    editor.Options.AutoDetectWordPaste = true;
    await editor.Editor.PasteFromMsWordAsync();

    Continue with

    Last updated on Oct 18, 2026

    Put this into practice.

    Start with the C# Avalonia sample. Restore this edition's package and install the native browser prerequisites before running it.

    Prefer a guided look? Book a free live demo with our engineers - live on Zoom or Teams, never a chatbot.