你怎么叫"文件格式"编程方式从C#? [英] How do you call "Document Format" programmatically from C#?

查看:132
本文介绍了你怎么叫"文件格式"编程方式从C#?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在写一个简单的VS加载项并想以编程方式调用内码文档格式选项(编辑下)。谷歌今天是不是对我很友好....


解决方案

  CMD命令= _applicationObject.Commands.Item(Edit.FormatDocument,-1); 
对象哑= NULL;
_applicationObject.Commands.Raise(cmd.Gu​​id,cmd.ID,裁判假人,假人参考);


I'm writing a simple VS add-in and would like to programmatically invoke the "Document Format" option (under Edit) within code. Google isn't being very friendly to me today....

解决方案

Command cmd = _applicationObject.Commands.Item("Edit.FormatDocument", -1);
object dummy = null;
_applicationObject.Commands.Raise(cmd.Guid, cmd.ID, ref dummy, ref dummy);

这篇关于你怎么叫"文件格式"编程方式从C#?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆