Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you call "Document Format" programmatically from C#?

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....

like image 463
BFree Avatar asked May 01 '09 20:05

BFree


1 Answers

Command cmd = _applicationObject.Commands.Item("Edit.FormatDocument", -1);
object dummy = null;
_applicationObject.Commands.Raise(cmd.Guid, cmd.ID, ref dummy, ref dummy);
like image 177
user95144 Avatar answered Sep 29 '22 02:09

user95144