Be the first user to complete this post
|
Add to List |
VBA-Excel: Open an Existing Word Document
To open an existing Microsoft Word Document using Microsoft Excel, you need to follow the steps below:
- Create the object of Microsoft Word
- Using MS word object, Open the existing word document by providing the complete path
- Make the MS Word visible
Create the object of Microsoft Word
Set objWord = CreateObject(“Word.Application”)
Using MS word object, Open the existing word document by providing the complete path
Set objDoc = objWord.Documents.Open("D:\OpenMe.docx")
Make the MS Word Visible
objWord.Visible = True
Complete Code:
Function FnOpeneWordDoc() Dim objWord Dim objDoc Set objWord = CreateObject("Word.Application") Set objDoc = objWord.Documents.Open("D:\OpenMe.docx") objWord.Visible = True End Function
Also Read:
- VBA-Excel — AttachmentFetcher — Download all the Attachments from All the Mails of Specific Subject in Microsoft Outlook .
- Send Mail With Multiple Different Attachments From MS Outlook using Excel.
- VBA-Excel: Add/Insert multiple Images/Pictures from a folder in Word Document
- Excel-VBA : Open a MS Word Document using Excel File using Explorer Window.
- VBA-Excel: Read Data from XML File