# devexpress-examples/winforms-richedit-export-the-document-into-an-outlook-mail-item architecture

> Architecture diagram of the GitHub repository devexpress-examples/winforms-richedit-export-the-document-into-an-outlook-mail-item, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/devexpress-examples/winforms-richedit-export-the-document-into-an-outlook-mail-item
- Repository: https://github.com/devexpress-examples/winforms-richedit-export-the-document-into-an-outlook-mail-item

## Overview

This DevExpress WinForms example loads a RichEdit document and lets a user prepare it as an Outlook email. In the sampled C# implementation, the application entry point opens the form; the form validates recipient and subject, creates an Outlook mail item, and delegates HTML export to an exporter that embeds document images as attachments. The README identifies a parallel VB implementation, but its source was not sampled, so its internal flow is not expanded here.

Main entry points: [`CS/Form1.cs`](https://github.com/devexpress-examples/winforms-richedit-export-the-document-into-an-outlook-mail-item/blob/24.2.1%2B/CS/Form1.cs) (Mail form), [`CS/Program.cs`](https://github.com/devexpress-examples/winforms-richedit-export-the-document-into-an-outlook-mail-item/blob/24.2.1%2B/CS/Program.cs) (App entry), [`CS/Hello.docx`](https://github.com/devexpress-examples/winforms-richedit-export-the-document-into-an-outlook-mail-item/blob/24.2.1%2B/CS/Hello.docx) (Sample document), [`VB/Form1.vb`](https://github.com/devexpress-examples/winforms-richedit-export-the-document-into-an-outlook-mail-item/blob/24.2.1%2B/VB/Form1.vb) (VB mail form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["WinForms app"]
  node_entry["App entry<br/>[Program.cs]"]
  node_form["Mail form<br/>[Form1.cs]"]
  node_document["Sample document<br/>[Hello.docx]"]
  node_vbform["VB mail form<br/>[Form1.vb]"]
end

subgraph group_export["Document export"]
  node_exporter["HTML exporter<br/>[Form1.cs]"]
  node_temp["Image files"]
end

subgraph group_outlook["Outlook integration"]
  node_outlook["Outlook mail item"]
end

node_user(("User"))

node_user -->|"launches"| node_entry
node_entry -->|"opens"| node_form
node_form -->|"loads"| node_document
node_form -->|"creates mail"| node_outlook
node_form -->|"exports document"| node_exporter
node_exporter -->|"writes images"| node_temp
node_exporter -->|"sets HTML; attaches images"| node_outlook
node_user -.->|"uses example"| node_vbform

click node_entry "https://github.com/devexpress-examples/winforms-richedit-export-the-document-into-an-outlook-mail-item/blob/24.2.1%2B/CS/Program.cs"
click node_form "https://github.com/devexpress-examples/winforms-richedit-export-the-document-into-an-outlook-mail-item/blob/24.2.1%2B/CS/Form1.cs"
click node_document "https://github.com/devexpress-examples/winforms-richedit-export-the-document-into-an-outlook-mail-item/blob/24.2.1%2B/CS/Hello.docx"
click node_exporter "https://github.com/devexpress-examples/winforms-richedit-export-the-document-into-an-outlook-mail-item/blob/24.2.1%2B/CS/Form1.cs"
click node_vbform "https://github.com/devexpress-examples/winforms-richedit-export-the-document-into-an-outlook-mail-item/blob/24.2.1%2B/VB/Form1.vb"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_form,node_document,node_vbform,node_user toneBlue
class node_exporter,node_temp toneAmber
class node_outlook toneMint
```

## Components

### WinForms app

- [App entry](https://github.com/devexpress-examples/winforms-richedit-export-the-document-into-an-outlook-mail-item/blob/24.2.1%2B/CS/Program.cs): `CS/Program.cs`
- [Mail form](https://github.com/devexpress-examples/winforms-richedit-export-the-document-into-an-outlook-mail-item/blob/24.2.1%2B/CS/Form1.cs): `CS/Form1.cs`
- [Sample document](https://github.com/devexpress-examples/winforms-richedit-export-the-document-into-an-outlook-mail-item/blob/24.2.1%2B/CS/Hello.docx): `CS/Hello.docx`
- [VB mail form](https://github.com/devexpress-examples/winforms-richedit-export-the-document-into-an-outlook-mail-item/blob/24.2.1%2B/VB/Form1.vb): `VB/Form1.vb`

### Document export

- [HTML exporter](https://github.com/devexpress-examples/winforms-richedit-export-the-document-into-an-outlook-mail-item/blob/24.2.1%2B/CS/Form1.cs): `CS/Form1.cs`
- **Image files**

### Outlook integration

- **Outlook mail item**

### Other components

- **User**

## Connections

- User → App entry: launches (evidence: `CS/Program.cs`)
- App entry → Mail form: opens (evidence: `CS/Program.cs`)
- Mail form → Sample document: loads (evidence: `CS/Form1.cs`)
- Mail form → Outlook mail item: creates mail (evidence: `CS/Form1.cs`)
- Mail form → HTML exporter: exports document (evidence: `CS/Form1.cs`)
- HTML exporter → Image files: writes images (evidence: `CS/Form1.cs`)
- HTML exporter → Outlook mail item: sets HTML; attaches images (evidence: `CS/Form1.cs`)
- User → VB mail form: uses example (evidence: `Readme.md`)
