Close & New MSWord Document using VB .NET

Sakthi.Singaravel
Posted by Sakthi.Singaravel under VB.NET category on | Points: 40 | Views : 1810
For close word document..

mWord.ActiveDocument.Close()


For open a word document..

mWord.Documents.Add(Template:="Normal", NewTemplate:=False, DocumentType:=0)


Here MSWord is object for current opened word document.

Object declaration is,

Dim MSWord As Word.Application =  System.Runtime.InteropServices.Marshal.GetActiveObject("Word.Application")

Comments or Responses

Login to post response