Show Buttons
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkdin
Share On Reddit
Contact us
Hide Buttons

VBA-Excel: Create a new Word Document

For cre­at­ing a new Microsoft Word Doc­u­ment using Microsoft Excel, you need to fol­low the steps below:

  • Cre­ate the object of Microsoft Word
  • Add doc­u­ments to the Word
  • Make the MS Word visible

Cre­ate the object of Microsoft Word

Set obj­Word = CreateObject(“Word.Application”)

Add doc­u­ments to the Word

Set obj­Doc = objWord.Documents.Add

Make the MS Word Visible

objWord.Visible = True

 

Com­plete Code:

Function FnCreateWordDoc()

   Dim objWord

   Dim objDoc

   Set objWord = CreateObject("Word.Application")

   Set objDoc = objWord.Documents.Add    

   objWord.Visible = True

End Function

 

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: