Be the first user to complete this post

  • 0
Add to List

VBA-Excel: Create a new Word Document

For creating a new Microsoft Word Document using Microsoft Excel, you need to follow the steps below:

  • Create the object of Microsoft Word
  • Add documents to the Word
  • Make the MS Word visible

Create the object of Microsoft Word

Set objWord = CreateObject(“Word.Application”)

Add documents to the Word

Set objDoc = objWord.Documents.Add

Make the MS Word Visible

objWord.Visible = True

Complete Code:

Function FnCreateWordDoc()

   Dim objWord

   Dim objDoc

   Set objWord = CreateObject("Word.Application")

   Set objDoc = objWord.Documents.Add    

   objWord.Visible = True

End Function

Also Read:

  1. Excel-VBA : Change Passwords for all the WorkSheets in one shot
  2. VBA-Excel: Working with Bookmarks- Insert text before Bookmark
  3. VBA-Excel: Add/Insert a Image/Picture in Word Document
  4. Excel-VBA : Send a Mail using Predefined Template From MS Outlook Using Excel
  5. Excel-VBA : Send a Excel Workbook as Attachment in Mail From MS Outlook Using Excel
  6. VBA-Excel: Convert Numbers (Rupees) into Words OR Text - Updated Till 1000000 Crore With Decimal Numbers
  7. VBA-Excel: Add Worksheets For All The Given Dates Except Weekends and Copy The Common Template In Each Worksheet
  8. VBA-Excel: Open word document using GetObject()