Word 2007 的语法突出显示
有没有办法在 Microsoft Word 2007 中设置突出显示 VB.NET 关键字的样式,就像 Visual Studio IDE 那样?
Is there a way, in Microsoft Word 2007, to set up a style that will highlight VB.NET keywords, just like the Visual Studio IDE does?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
从 Visual Studio 复制粘贴
copy-paste from visual studio
使用 SciTE 编辑代码示例,然后使用其“编辑/复制为 RTF”命令将它们复制到带有语法突出显示的 Word 中。
Use SciTE to edit your code samples, then use its "Edit / Copy as RTF" command to copy them into Word complete with syntax highlighting.
我不知道它会是什么样子,但我打赌您可以创建一个新样式,将其应用到代码示例,然后使用宏中的样式迭代文本块,并在宏中突出显示代码。
但这是一项繁重的工作,正如其他人所说,您可以从一些 IDE 中复制/粘贴并粘贴语法样式的代码。
I don't know what it would look like, but I bet you could just make a new style, apply it to the code samples, and iterate through the blocks of text with the style in a macro and do code highlighting in the Macro.
But that's a lot of work, and as others have said, you can copy/paste from a few IDEs and paste syntactically styled code.
不容易。 你想达到什么目的? 有多种工具可以生成突出显示的 HTML 或代码图像以在演示文稿中使用。 (我希望您不要尝试将 MS Word 用作 IDE!)
Not easily. What are you trying to accomplish? There are several tools that will generate highlighted HTML or images of your code for use in presentations. (I hope you're not trying to use MS Word as an IDE!)