Microsoft Teams is a collaboration platform that makes it easy to communicate with team members working on similar projects. From sharing your screen, to instant message like chatting, MS Teams offers a lot of useful features.
For software developers, a particularly useful feature is the ability to send snippets / blocks of code to members of your team. In this article, we’ll show you how to send a snippet of code in Microsoft Teams.
How to Send a Snippet of Code in Microsoft Teams
Step 1: From a chat window, click the
Format button under the message box
Step 2: Click the
3 dots in the upper right corner of the, now expanded, message box
Step 3: Select
Step 4: In the new window, paste your code snippet then click
You can also change syntax highlighting by using the language drop down in the upper right corner.
Share Code Snippets with Keyboard Shortcuts
While the method above is great for one-off code sharing, doing it often can become a bit tedious. Thankfully, Teams has some keyboard shortcuts to make sharing your code even easier.
- To send an inline snippet of code, start and end the text with a single back tick (`).
- To send a block of code, first preface the text with three back ticks (“`) then paste your block of code.
Check out Microsoft’s article on markdown formatting in Teams for other text formatting tips.