How to Pretty print VBA code?

后端 未结 7 2249
傲寒
傲寒 2020-12-23 14:09

How do you copy VBA code into a Word document and retain the VBA editor color scheme?

7条回答
  •  难免孤独
    2020-12-23 14:34

    The following works with Visual Studio Code:

    1. Start VS Code.
    2. New file.
    3. Copy & Paste the VBA code into the VS Code window.
    4. In the lower right-hand corner, click on "Plain Text" and select "Visual Basic" instead. Note that the code is now syntax-highlighted.
    5. Copy & Paste the formatted code into Word.

提交回复
热议问题