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

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

 

 

You may also like...

6 Responses

  1. ashwini says:

    Sumit

    Its wonderful to see the excel post from you as it is important to learn this excel functions as this can be used in our practises..

    kudos !!!!

  2. John says:

    Simple – but what if you don’t want to open the same file every time? Hard coding the file name gets rather awkward. How do you open the Explorer window to select a Word document?

  3. Yogesh Dhage says:

    Hi
    I want to open a word document through macros and wants to format opened document using single click.

  1. September 17, 2015

    […] Yep, Google is your friend. https://social.msdn.microsoft.com/Fo…e?forum=isvvba VBA-Excel: Open an Existing Word Document Creating a Word Document with Excel VBA VBA-Excel: Create and Save the Word document to name but a […]

Leave a Reply

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

%d bloggers like this: