vsto 插件发布 用 onceclick 用户只需要拿到 setup.exe 安装一下就行

第0步设置 onceclick发布,设置ftp发布地址

 

第一步:设置安装插件可受信任的:如下代码,txt改成reg后缀

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\Security\TrustManager\PromptingLevel]
"MyComputer"="Enabled"
"LocalIntranet"="Enabled"
"TrustedSites"="Enabled"
"Internet"="Enabled"
"UntrustedSites"="Enabled"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\Security\TrustManager\PromptingLevel]
"MyComputer"="Enabled"
"LocalIntranet"="Enabled"
"Internet"="Enabled"
"TrustedSites"="Enabled"
"UntrustedSites"="Enabled"

 

第二步双击 setup.exe

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
您可以按照以下步骤使用VSTO拿到PowerPoint的右键菜单: 1. 在Visual Studio中创建一个新的VSTO项目。 2. 在项目的引用中添加Microsoft.Office.Interop.PowerPoint程序集引用。 3. 在项目的解决方案资源管理器中打开ThisAddIn.cs文件。 4. 在ThisAddIn.cs文件中添加以下代码: ``` private void ThisAddIn_Startup(object sender, System.EventArgs e) { this.Application.WindowBeforeRightClick += new Microsoft.Office.Interop.PowerPoint.EApplication_WindowBeforeRightClickEventHandler(Application_WindowBeforeRightClick); } private void Application_WindowBeforeRightClick(Microsoft.Office.Interop.PowerPoint.Selection Sel, ref bool Cancel) { //在此处添加您的代码以创建右键菜单 } ``` 5. 在Application_WindowBeforeRightClick方法中添加您自己的代码以创建右键菜单。您可以使用以下代码示例创建一个简单的右键菜单: ``` private void Application_WindowBeforeRightClick(PowerPoint.Selection sel, ref bool Cancel) { if (sel.Type == PowerPoint.PpSelectionType.ppSelectionSlides) { PowerPoint.CommandBarButton button = (PowerPoint.CommandBarButton)this.Application.CommandBars["Shortcut Menus"].Controls.Add(MsoControlType.msoControlButton, temporary: true); button.Caption = "My Custom Command"; button.Click += new Microsoft.Office.Core._CommandBarButtonEvents_ClickEventHandler(MyCustomCommand_Click); button.Visible = true; } } private void MyCustomCommand_Click(Microsoft.Office.Core.CommandBarButton Ctrl, ref bool CancelDefault) { // 在此处添加您希望执行的自定义命令 } ``` 6. 调试您的代码并在PowerPoint中右键单击幻灯片以查看您的自定义右键菜单。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值