|
Be the first user to complete this post
|
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:
- VBA-Excel — AttachmentFetcher — Download all the Attachments from All the Mails of Specific Subject in Microsoft Outlook .
- Excel-VBA : Send a Simple Mail From MS Outlook Using Excel
- Excel-VBA : Open a MS Word Document using Excel File using Explorer Window.
- VBA-Excel: Create and Save the Word document
- VBA-Excel: Convert Numbers (Rupees) into Words OR Text - Updated Till 1000000 Crore With Decimal Numbers