Tuesday, January 27, 2009

Office Development with VS 2010

Get up to date with office development on .net platform with Somasegar's post here

My personal favourite is simplification of .net's integration with COM's OM.

As per the example posted in Somasegar's blog.

Instead of doing the following

object fileName = "Test.docx";

object missing = System.Reflection.Missing.Value;

doc.SaveAs(ref fileName,

ref missing, ref missing, ref missing,

ref missing, ref missing, ref missing,

ref missing, ref missing, ref missing,

ref missing, ref missing, ref missing,

ref missing, ref missing, ref missing);


You can do with VS 2010

object fileName = "Test.docx";

doc.SaveAs(fileName);

No comments: