在 MS Project 中通过宏运行 C# 代码
我有一些格式化 MS Project 文件的 C# 代码。这段代码工作得非常好。
问题:现在,我想通过宏脚本运行相同的 C# 代码。
问题:如何通过 MS Project 宏执行 C# 代码。因此,每当用户打开 MS Project 文件时,它都会运行宏,而宏又会执行 C# 代码并格式化相关文件。
我正在使用 Ms Project 2002。
这可能吗?请索取所需的任何其他信息。
I have some C# code which formats a MS Project file. This code works absolutely fine.
Problem: Now, I want to run the same C# code through a macro script.
Question: How can I execute the C# code through my MS Project macro. So, whenever the user opens an MS Project file, it runs the macro which in turn executes the C# code and formats the concerned file.
I am using Ms Project 2002.
Is this even possible? Please request for any additional information required.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您想要使用 Visual Studio Toolkit for Office (VSTO) 创建一个 Office 插件,该插件将在应用程序启动或项目加载时调用。您可以找到一篇很好的“入门”文章 此处。
该示例使用 VB.NET 编写,但 C# 中也提供相同的原理和对象模型。
What you want to do use the Visual Studio Toolkit for Office (VSTO) to create an Office plug-in that will be called on application start or project load. You can find a good "getting started" article here.
The sample is in VB.NET but the same principles and object model is available in C#.