更新时间:2023-02-15 20:48:27
CMD命令= _applicationObject.Commands.Item(Edit.FormatDocument,-1);
对象哑= NULL;
_applicationObject.Commands.Raise(cmd.Guid,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);