Create New WordDocument using VB.Net.

This code is used to create new word document in windows application.
First You will add reference in your project
then You will imports--> imports

add reference-->


Private Sub loadword()
Dim wd As New Word.Application
Dim docu As Word.Document
Dim newTemplate As Object = True
Dim docType As Object = 0
Dim isVisible As Object = True
Dim filename As String = "C:/normal.doc"
docu = wd.Documents.Add(filename, newTemplate, docType, isVisible)
wd.Visible = True
End Sub


No responses found. Be the first to comment...

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: