当前位置: 首页 > news >正文

站长工具综合查询中国建筑设计

站长工具综合查询,中国建筑设计,修改WordPress文章发布页面,二级目录怎么生成为 Microsoft Word 创建自动化客户端 启动 Visual Studio .NET。在文件菜单上#xff0c;单击新建#xff0c;然后单击项目。从 Visual C# 项目类型中选择 Windows 应用程序。默认情况下会创建 Form1。添加对 Microsoft Word 对象库的引用。为此#xff0c;请按照下列步骤操…为 Microsoft Word 创建自动化客户端 启动 Visual Studio .NET。在文件菜单上单击新建然后单击项目。从 Visual C# 项目类型中选择 Windows 应用程序。默认情况下会创建 Form1。添加对 Microsoft Word 对象库的引用。为此请按照下列步骤操作在项目菜单上单击添加引用。在 COM 选项卡上找到 Microsoft Word 对象库然后单击选择。注意Microsoft Office 2003 包含主 Interop 程序集 (PIA)。 Microsoft Office XP 不包含 PIA但您可以下载 PIA。 有关 Office XP PIA 的其他信息请单击下面的文章编号以查看 Microsoft 知识库中相应的文章 328912 INFOMicrosoft Office XP PIA 可供下载 在添加引用对话框中单击确定以接受您的选择。如果系统提示您为选定的库生成包装请单击是。在视图菜单上选择工具箱以显示工具箱然后向 Form1 添加一个按钮。双击 Button1。出现该窗体的代码窗口。在代码窗口中将以下代码 private void button1_Click(object sender, System.EventArgs e) { } 替换为 private void button1_Click(object sender, System.EventArgs e) {Word.Application oWord;Word._Document oDoc;object oMissing Missing.Value;object oDocBuiltInProps;object oDocCustomProps;//Create an instance of Microsoft Word and make it visible.oWord new Word.Application();oWord.Visible true;//Create a new Document and get the BuiltInDocumentProperties collection.oDoc oWord.Documents.Add(ref oMissing, ref oMissing, ref oMissing, ref oMissing);oDocBuiltInProps oDoc.BuiltInDocumentProperties;Type typeDocBuiltInProps oDocBuiltInProps.GetType();//Get the Author property and display it.string strIndex Author;string strValue;object oDocAuthorProp typeDocBuiltInProps.InvokeMember(Item, BindingFlags.Default | BindingFlags.GetProperty, null,oDocBuiltInProps, new object[] {strIndex} );Type typeDocAuthorProp oDocAuthorProp.GetType();strValue typeDocAuthorProp.InvokeMember(Value, BindingFlags.Default |BindingFlags.GetProperty,null,oDocAuthorProp,new object[] {} ).ToString();MessageBox.Show( The Author is: strValue,Author );//Set the Subject property.strIndex Subject;strValue The Subject;typeDocAuthorProp.InvokeMember(Item, BindingFlags.Default | BindingFlags.SetProperty, null,oDocBuiltInProps, new object[] {strIndex,strValue} );//Add a property/value pair to the CustomDocumentProperties collection.oDocCustomProps oDoc.CustomDocumentProperties;Type typeDocCustomProps oDocCustomProps.GetType();strIndex Knowledge Base Article;strValue Q303296;object[] oArgs {strIndex,false,MsoDocProperties.msoPropertyTypeString,strValue};typeDocCustomProps.InvokeMember(Add,BindingFlags.Default | BindingFlags.InvokeMethod, null, oDocCustomProps, oArgs );MessageBox.Show(Select \Properties\ from the File menu to view the changes.\nSelect the Summary tab to view the Subject property and the Custom tab to view the Knowledge Base Article property., Check File Properties,MessageBoxButtons.OK,MessageBoxIcon.Information); } 滚动到代码窗口顶部然后将以下行添加到 using 指令列表的末尾 using Microsoft.Office.Core; using Word Microsoft.Office.Interop.Word; using System.Reflection; 按 F5 键运行该应用程序。注意DocumentProperties 和 DocumentProperty 接口是晚期绑定接口。若要使用这些接口必须像对待 IDispatch 接口那样对待它们。
http://www.pierceye.com/news/495373/

相关文章:

  • 做网站好还是做淘宝好市场调研模板
  • 网站做换肤做一个平台费用是多少
  • 省内注销二建 建设部网站更新慢网站建设合同书封皮
  • 天津城市建设网站营销型网站的好处
  • 网站建设维护文档好看的页面
  • 网站搜索优化官网网站建设在电子商务中的作用的看法
  • 网站推广费用价格html大屏展示模板
  • 编辑网站用什么软件网站开发人员职责
  • 网站搜索引擎提交wordpress发布站点
  • 阳春网站建设天水网站seo
  • 仙桃市建设局网站wordpress链接前面的图标
  • 温州市城乡建设建档案馆网站公司装修费用可以一次性入账吗
  • 房地产开发公司网站宠物网页设计模板
  • 网站备案信息可以改吗中国做二手房最大的网站
  • 设计 企业网站罗湖网站-建设深圳信科
  • 太原自助模板建站手机版电脑qq登录入口
  • 公司网站建设哪家比较好app 网站
  • 建设银行个人网站打不开个人主页模板下载
  • 山西建设公司网站wordpress视频适应手机端
  • 原型样网站做一般的公司门户网站投资额
  • 南宁百度网站公司电话网站配置优化
  • 德州网站建设的公司免费注册公司怎么注册
  • 成都开发网站建设中国建设规划采购网站
  • 企业网站建设应避免数据孤岛深圳东莞网站建设
  • pk10网站怎么做郑州seo费用
  • 菏泽市建设局网站电话网站建设服务咨询
  • 购物网站模版广州外贸网络推广
  • 高碑店网站网站建设手机软件开发的模式
  • 公司网站开发国内外现状网络营销外包团队哪些好
  • 淘客网站怎么建立如何用api做网站