我已经创建了一个单词2010 vsto加载项,它在visual studio中运行良好。但是,我不确定如何发布它。我试图右键单击该项目并发布它,但加载项似乎不起作用(一些缺少按钮,没有数据访问..当我点击时它甚至没有显示我的错误按钮(没有任何反应)。)我有Visual Studio安装程序工具,但我不确定要添加到安装文件的文件(我的项目包含加载项和一些窗体,并依赖于访问数据库文件和最终安装目录中应存在的一些word文档。如果我使用Visual Studio安装程序工具,则输出的类型为.dll而不是.vsto,因此不会被Word读取以便安装。有任何想法吗? 谢谢 How it opens within visual studio How it opens after installation
<hostitem:hostItem hostitem:baseType="Microsoft.Office.Tools.AddInBase" hostitem:namespace="MoEAddin" hostitem:className="ThisAddIn" hostitem:identifier="ThisAddIn" hostitem:primaryCookie="AddIn" hostitem:master="true" hostitem:factoryType="Microsoft.Office.Tools.Word.ApplicationFactory" hostitem:startupIndex="0" xmlns:hostitem="http://schemas.microsoft.com/2004/VisualStudio/Tools/Applications/HostItem.xsd">
<hostitem:hostObject hostitem:name="Application" hostitem:identifier="Application" hostitem:type="Microsoft.Office.Interop.Word.Application" hostitem:cookie="Application" hostitem:modifier="Internal" />
<hostitem:hostControl hostitem:name="CustomTaskPanes" hostitem:identifier="CustomTaskPanes" hostitem:type="Microsoft.Office.Tools.CustomTaskPaneCollection" hostitem:primaryCookie="CustomTaskPanes" hostitem:modifier="Internal" />
<hostitem:hostControl hostitem:name="VstoSmartTags" hostitem:identifier="VstoSmartTags" hostitem:type="Microsoft.Office.Tools.SmartTagCollection" hostitem:primaryCookie="VstoSmartTags" hostitem:modifier="Internal" />
</hostitem:hostItem>
&#13;
namespace MoEAddin
{
partial class moeRibbon1 : Microsoft.Office.Tools.Ribbon.RibbonBase
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
public moeRibbon1()
: base(Globals.Factory.GetRibbonFactory())
{
InitializeComponent();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.tab1 = this.Factory.CreateRibbonTab();
this.groupGenerics = this.Factory.CreateRibbonGroup();
this.groupStudies = this.Factory.CreateRibbonGroup();
this.groupUserPreferences = this.Factory.CreateRibbonGroup();
this.buttonGenericLetter = this.Factory.CreateRibbonButton();
this.buttonGenericReport = this.Factory.CreateRibbonButton();
this.splitButtonScoping = this.Factory.CreateRibbonSplitButton();
this.buttonScopingApproval = this.Factory.CreateRibbonButton();
this.buttonScopingAmendment = this.Factory.CreateRibbonButton();
this.buttonScopingConditionalApproval = this.Factory.CreateRibbonButton();
this.splitButtonEIA = this.Factory.CreateRibbonSplitButton();
this.buttonEIAApproval = this.Factory.CreateRibbonButton();
this.buttonEIAAmendment = this.Factory.CreateRibbonButton();
this.buttonEIAConditionalApproval = this.Factory.CreateRibbonButton();
this.splitButtonIEE = this.Factory.CreateRibbonSplitButton();
this.buttonIEEApproval = this.Factory.CreateRibbonButton();
this.buttonIEEAmendment = this.Factory.CreateRibbonButton();
this.buttonIEEConditionalApproval = this.Factory.CreateRibbonButton();
this.splitButtonAudit = this.Factory.CreateRibbonSplitButton();
this.buttonAuditApproval = this.Factory.CreateRibbonButton();
this.buttonAuditAmendment = this.Factory.CreateRibbonButton();
this.buttonAuditConditionalApproval = this.Factory.CreateRibbonButton();
this.buttonUserPreferences = this.Factory.CreateRibbonButton();
this.tab1.SuspendLayout();
this.groupGenerics.SuspendLayout();
this.groupStudies.SuspendLayout();
this.groupUserPreferences.SuspendLayout();
this.SuspendLayout();
//
// tab1
//
this.tab1.ControlId.ControlIdType = Microsoft.Office.Tools.Ribbon.RibbonControlIdType.Office;
this.tab1.Groups.Add(this.groupGenerics);
this.tab1.Groups.Add(this.groupStudies);
this.tab1.Groups.Add(this.groupUserPreferences);
this.tab1.Label = "MoE";
this.tab1.Name = "tab1";
//
// groupGenerics
//
this.groupGenerics.Items.Add(this.buttonGenericLetter);
this.groupGenerics.Items.Add(this.buttonGenericReport);
this.groupGenerics.Label = "Generics";
this.groupGenerics.Name = "groupGenerics";
//
// groupStudies
//
this.groupStudies.Items.Add(this.splitButtonScoping);
this.groupStudies.Items.Add(this.splitButtonEIA);
this.groupStudies.Items.Add(this.splitButtonIEE);
this.groupStudies.Items.Add(this.splitButtonAudit);
this.groupStudies.Label = "Studies";
this.groupStudies.Name = "groupStudies";
//
// groupUserPreferences
//
this.groupUserPreferences.Items.Add(this.buttonUserPreferences);
this.groupUserPreferences.Label = "User Preferences";
this.groupUserPreferences.Name = "groupUserPreferences";
//
// buttonGenericLetter
//
this.buttonGenericLetter.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
this.buttonGenericLetter.Image = global::MoEAddin.Properties.Resources.LetterIcon;
this.buttonGenericLetter.Label = "كتاب وزير";
this.buttonGenericLetter.Name = "buttonGenericLetter";
this.buttonGenericLetter.ShowImage = true;
this.buttonGenericLetter.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.buttonGenericLetter_Click);
//
// buttonGenericReport
//
this.buttonGenericReport.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
this.buttonGenericReport.Image = global::MoEAddin.Properties.Resources.ReportIcon;
this.buttonGenericReport.Label = "تقرير";
this.buttonGenericReport.Name = "buttonGenericReport";
this.buttonGenericReport.ShowImage = true;
this.buttonGenericReport.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.buttonGenericReport_Click);
//
// splitButtonScoping
//
this.splitButtonScoping.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
this.splitButtonScoping.Image = global::MoEAddin.Properties.Resources.book_bookmark;
this.splitButtonScoping.Items.Add(this.buttonScopingApproval);
this.splitButtonScoping.Items.Add(this.buttonScopingAmendment);
this.splitButtonScoping.Items.Add(this.buttonScopingConditionalApproval);
this.splitButtonScoping.Label = "تحديد نطاق تقييم أثر بيئي";
this.splitButtonScoping.Name = "splitButtonScoping";
this.splitButtonScoping.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.splitButtonScoping_Click);
//
// buttonScopingApproval
//
this.buttonScopingApproval.Label = "موافقة";
this.buttonScopingApproval.Name = "buttonScopingApproval";
this.buttonScopingApproval.ShowImage = true;
this.buttonScopingApproval.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.buttonScopingApproval_Click);
//
// buttonScopingAmendment
//
this.buttonScopingAmendment.Label = "تعديل التقرير";
this.buttonScopingAmendment.Name = "buttonScopingAmendment";
this.buttonScopingAmendment.ShowImage = true;
this.buttonScopingAmendment.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.buttonScopingAmendment_Click);
//
// buttonScopingConditionalApproval
//
this.buttonScopingConditionalApproval.Label = "موافقة مشروطة";
this.buttonScopingConditionalApproval.Name = "buttonScopingConditionalApproval";
this.buttonScopingConditionalApproval.ShowImage = true;
this.buttonScopingConditionalApproval.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.buttonScopingConditionalApproval_Click);
//
// splitButtonEIA
//
this.splitButtonEIA.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
this.splitButtonEIA.Image = global::MoEAddin.Properties.Resources.book_bookmark;
this.splitButtonEIA.Items.Add(this.buttonEIAApproval);
this.splitButtonEIA.Items.Add(this.buttonEIAAmendment);
this.splitButtonEIA.Items.Add(this.buttonEIAConditionalApproval);
this.splitButtonEIA.Label = "تقييم أثر بيئي";
this.splitButtonEIA.Name = "splitButtonEIA";
//
// buttonEIAApproval
//
this.buttonEIAApproval.Label = "موافقة";
this.buttonEIAApproval.Name = "buttonEIAApproval";
this.buttonEIAApproval.ShowImage = true;
this.buttonEIAApproval.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.buttonEIAApproval_Click);
//
// buttonEIAAmendment
//
this.buttonEIAAmendment.Label = "تعديل التقرير";
this.buttonEIAAmendment.Name = "buttonEIAAmendment";
this.buttonEIAAmendment.ShowImage = true;
this.buttonEIAAmendment.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.buttonEIAAmendment_Click);
//
// buttonEIAConditionalApproval
//
this.buttonEIAConditionalApproval.Label = "موافقة مشروطة";
this.buttonEIAConditionalApproval.Name = "buttonEIAConditionalApproval";
this.buttonEIAConditionalApproval.ShowImage = true;
this.buttonEIAConditionalApproval.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.buttonEIAConditionalApproval_Click);
//
// splitButtonIEE
//
this.splitButtonIEE.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
this.splitButtonIEE.Image = global::MoEAddin.Properties.Resources.book_bookmark;
this.splitButtonIEE.Items.Add(this.buttonIEEApproval);
this.splitButtonIEE.Items.Add(this.buttonIEEAmendment);
this.splitButtonIEE.Items.Add(this.buttonIEEConditionalApproval);
this.splitButtonIEE.Label = "تقييم بيئي مبدئي";
this.splitButtonIEE.Name = "splitButtonIEE";
this.splitButtonIEE.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.splitButtonIEE_Click);
//
// buttonIEEApproval
//
this.buttonIEEApproval.Label = "موافقة";
this.buttonIEEApproval.Name = "buttonIEEApproval";
this.buttonIEEApproval.ShowImage = true;
this.buttonIEEApproval.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.buttonIEEApproval_Click);
//
// buttonIEEAmendment
//
this.buttonIEEAmendment.Label = "تعديل التقرير";
this.buttonIEEAmendment.Name = "buttonIEEAmendment";
this.buttonIEEAmendment.ShowImage = true;
this.buttonIEEAmendment.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.buttonIEEAmendment_Click);
//
// buttonIEEConditionalApproval
//
this.buttonIEEConditionalApproval.Label = "طلب تقييم أثر بيئي";
this.buttonIEEConditionalApproval.Name = "buttonIEEConditionalApproval";
this.buttonIEEConditionalApproval.ShowImage = true;
this.buttonIEEConditionalApproval.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.buttonIEEConditionalApproval_Click);
//
// splitButtonAudit
//
this.splitButtonAudit.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
this.splitButtonAudit.Image = global::MoEAddin.Properties.Resources.book_bookmark;
this.splitButtonAudit.Items.Add(this.buttonAuditApproval);
this.splitButtonAudit.Items.Add(this.buttonAuditAmendment);
this.splitButtonAudit.Items.Add(this.buttonAuditConditionalApproval);
this.splitButtonAudit.Label = "تدقيق بيئي";
this.splitButtonAudit.Name = "splitButtonAudit";
//
// buttonAuditApproval
//
this.buttonAuditApproval.Label = "موافقة";
this.buttonAuditApproval.Name = "buttonAuditApproval";
this.buttonAuditApproval.ShowImage = true;
this.buttonAuditApproval.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.buttonAuditApproval_Click);
//
// buttonAuditAmendment
//
this.buttonAuditAmendment.Label = "تعديل التقرير";
this.buttonAuditAmendment.Name = "buttonAuditAmendment";
this.buttonAuditAmendment.ShowImage = true;
this.buttonAuditAmendment.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.buttonAuditAmendment_Click);
//
// buttonAuditConditionalApproval
//
this.buttonAuditConditionalApproval.Label = "موافقة مشروطة";
this.buttonAuditConditionalApproval.Name = "buttonAuditConditionalApproval";
this.buttonAuditConditionalApproval.ShowImage = true;
this.buttonAuditConditionalApproval.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.buttonAuditConditionalApproval_Click);
//
// buttonUserPreferences
//
this.buttonUserPreferences.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
this.buttonUserPreferences.Image = global::MoEAddin.Properties.Resources.Bolt_Preferences;
this.buttonUserPreferences.Label = "خصائص عامّة";
this.buttonUserPreferences.Name = "buttonUserPreferences";
this.buttonUserPreferences.ShowImage = true;
this.buttonUserPreferences.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.buttonUserPreferences_Click);
//
// moeRibbon1
//
this.Name = "moeRibbon1";
this.RibbonType = "Microsoft.Word.Document";
this.Tabs.Add(this.tab1);
this.Load += new Microsoft.Office.Tools.Ribbon.RibbonUIEventHandler(this.moeRibbon1_Load);
this.tab1.ResumeLayout(false);
this.tab1.PerformLayout();
this.groupGenerics.ResumeLayout(false);
this.groupGenerics.PerformLayout();
this.groupStudies.ResumeLayout(false);
this.groupStudies.PerformLayout();
this.groupUserPreferences.ResumeLayout(false);
this.groupUserPreferences.PerformLayout();
this.ResumeLayout(false);
}
#endregion
internal Microsoft.Office.Tools.Ribbon.RibbonTab tab1;
internal Microsoft.Office.Tools.Ribbon.RibbonGroup groupGenerics;
internal Microsoft.Office.Tools.Ribbon.RibbonGroup groupStudies;
internal Microsoft.Office.Tools.Ribbon.RibbonButton buttonGenericLetter;
internal Microsoft.Office.Tools.Ribbon.RibbonButton buttonGenericReport;
internal Microsoft.Office.Tools.Ribbon.RibbonSplitButton splitButtonScoping;
internal Microsoft.Office.Tools.Ribbon.RibbonSplitButton splitButtonEIA;
internal Microsoft.Office.Tools.Ribbon.RibbonSplitButton splitButtonIEE;
internal Microsoft.Office.Tools.Ribbon.RibbonSplitButton splitButtonAudit;
internal Microsoft.Office.Tools.Ribbon.RibbonButton buttonScopingApproval;
internal Microsoft.Office.Tools.Ribbon.RibbonButton buttonScopingAmendment;
internal Microsoft.Office.Tools.Ribbon.RibbonButton buttonEIAApproval;
internal Microsoft.Office.Tools.Ribbon.RibbonButton buttonEIAAmendment;
internal Microsoft.Office.Tools.Ribbon.RibbonButton buttonIEEApproval;
internal Microsoft.Office.Tools.Ribbon.RibbonButton buttonIEEAmendment;
internal Microsoft.Office.Tools.Ribbon.RibbonButton buttonAuditApproval;
internal Microsoft.Office.Tools.Ribbon.RibbonButton buttonAuditAmendment;
internal Microsoft.Office.Tools.Ribbon.RibbonButton buttonScopingConditionalApproval;
internal Microsoft.Office.Tools.Ribbon.RibbonButton buttonEIAConditionalApproval;
internal Microsoft.Office.Tools.Ribbon.RibbonButton buttonIEEConditionalApproval;
internal Microsoft.Office.Tools.Ribbon.RibbonButton buttonAuditConditionalApproval;
internal Microsoft.Office.Tools.Ribbon.RibbonGroup groupUserPreferences;
internal Microsoft.Office.Tools.Ribbon.RibbonButton buttonUserPreferences;
}
partial class ThisRibbonCollection
{
internal moeRibbon1 moeRibbon1
{
get { return this.GetRibbon<moeRibbon1>(); }
}
}
}