To add your source code in PowerPoint slide while keeping the syntax highlighted, you will need to use Notepad++ and MS Word applications.
- From Notepad++, select all your code and Copy Text with Syntax Highlighting.
- Paste it with the option Keep Source Formatting in MS Word to keep the newlines and lines spacing.
- Copy from MS Word and paste it with the option Keep Source Formatting in MS PowerPoint .