Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Code Format Copier for OutlookNew to Visual Studio Code? Get it now.
Code Format Copier for Outlook

Code Format Copier for Outlook

Signal Path Works

|
3 installs
| (0) | Free
Copy selected code from VS Code into Outlook as HTML with language-aware syntax colors.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Code Format Copier for Outlook

Copy code from Visual Studio Code and paste it into Outlook with language syntax colors and formatting intact.

Features

  • Highlights the selected code for its VS Code language and uses an Outlook-safe light or dark palette.
  • Places explicit Windows CF_HTML and plain-text formats on the clipboard for reliable Outlook pasting.
  • Copies selected text only—use Select All first when you intentionally want the complete file.
  • Works in untrusted and virtual workspaces because it does not execute workspace code.
  • Sends no telemetry and makes no network requests.

Use it

  1. Select code in the editor.
  2. Press Ctrl+Alt+C on Windows/Linux or Cmd+Alt+C on macOS.
  3. Paste normally into an HTML-format Outlook message with Ctrl+V or Cmd+V.

You can also right-click in the editor and choose Copy Selected Code for Outlook (HTML), or run this command from the Command Palette:

  • Outlook Code: Copy Selected Code for Outlook (HTML)

Outlook paste setting

If Outlook removes the colors, choose Keep Source Formatting from its paste options. In classic Outlook for Windows, the default can be set under File > Options > Mail > Editor Options > Advanced > Cut, copy, and paste > Pasting from other programs.

Microsoft documents this behavior in Outlook Editor options.

Color behavior

The extension detects whether the active VS Code theme is light or dark and creates a matching Outlook-safe code block with inline syntax colors. Inline styles are used because Outlook may remove stylesheet classes when pasting.

The destination application still controls its final paste behavior. If Outlook offers a paste option, choose Keep Source Formatting.

Setting

outlookCodeFormatCopier.showConfirmation controls the short status-bar message shown after a copy. It defaults to true.

Privacy and security

The extension reads only the text you select. On Windows, it uses a local PowerShell clipboard helper to place HTML and plain text on the clipboard. It does not read unrelated files, execute workspace programs, contact external services, or collect telemetry.

Requirements

  • Windows 10 or 11
  • Visual Studio Code 1.85 or newer
  • An Outlook message composed in HTML format

Test locally before publishing

  1. Open this project folder in VS Code.
  2. Run npm install, then npm test in the integrated terminal.
  3. Press F5 and choose Run Extension if VS Code asks for a launch configuration.
  4. In the Extension Development Host window, open a code file and select only a few lines.
  5. Press Ctrl+Alt+C, then paste normally into a new Outlook message composed as HTML.
  6. Confirm that the colors are present and that the pasted text exactly matches the selection, with no unselected text added.
  7. To test the complete file intentionally, press Ctrl+A before Ctrl+Alt+C.

You can also build and install the exact local package:

npm run package:vsix
code --install-extension .\outlook-code-format-copier-1.1.0.vsix --force

Reload VS Code after installing the VSIX.

Support

The packaged extension includes SUPPORT.md with troubleshooting and issue-report details.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft