Code To Get MS WORD Document on Click Event In Windows Application
Microsoft.Office.Interop.Word.ApplicationClass wordObject = new Microsoft.Office.Interop.Word.ApplicationClass();
object
File = @” Ur Word Path From Solution Explorer”;
object
nullobject = System.Reflection.Missing.Value;
Microsoft.Office.Interop.Word.Application wordobject = new
Microsoft.Office.Interop.Word.Application();
wordobject.DisplayAlerts =
Microsoft.Office.Interop.Word.WdAlertLevel.wdAlertsNone;
Microsoft.Office.Interop.Word._Document docs = wordObject.Documents.Open(ref File, ref
nullobject, ref nullobject, ref nullobject, ref
nullobject, ref nullobject, ref nullobject, ref
nullobject, ref nullobject, ref nullobject, ref
nullobject, ref nullobject, ref nullobject, ref
nullobject, ref nullobject, ref nullobject);
No comments:
Post a Comment