且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

你怎么叫"文件格式"编程方式从C#?

更新时间:2023-02-15 20:48:27

  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);