Results 1 to 4 of 4

Thread: Open Word doc from Excel using Macros

  1. #1
    Join Date
    Feb 2009
    Posts
    56

    Open Word doc from Excel using Macros

    hello friends,

    Is it possible to open MS Word document from MS Excel using Macros ? If possible, Can someone provide me the macro code for the same ?

    thank you

  2. #2
    Join Date
    Apr 2008
    Posts
    4,642

    Re: Open Word doc from Excel using Macros

    Here's the macro code for you to open Ms Word document from Excel -

    Code:
    Sub Open_Word_Document()
    
    'Opens a Word Document from Excel
    
    Dim objWord As Object
    
    Set objWord = CreateObject("Word.Application")
    objWord.Visible = True
    
    'Change the directory path and file name to the location 
    'of your document
    
    objWord.Documents.Open "C:\test.doc"
    
    End Sub
    With this macro, you can open any word document on your computer. This is relatively small but very cool macro. You can attach it to a button or checkbox and then, whenever you'll click the button or checkbox, a specified Microsoft word document will be open.

  3. #3
    Join Date
    Apr 2008
    Posts
    4,642

    Re: Open Word doc from Excel using Macros

    You can also change the word document that you want to open just by changing a single line(second-last line) of this macro code -

    objWord.Documents.Open "C:\test.doc"

    so that the directory and file name including extension, point to the desired file on your computer.

  4. #4
    Join Date
    May 2008
    Posts
    4,345

    Re: Open Word doc from Excel using Macros

    Another way of opening Word document from Excel without using code, would be to attach a hyperlink to the command button that points to the Word document. This will automatically start Word and open the target file.

Similar Threads

  1. Excel not working properly to open macros
    By Kungfu Pandey in forum Windows Software
    Replies: 1
    Last Post: 06-01-2012, 10:03 PM
  2. Unable to open word, excel, pdf etc. attachments
    By Izharr in forum Windows Vista Mail
    Replies: 3
    Last Post: 27-07-2011, 12:55 AM
  3. Word/Excel slow to open
    By NavinS in forum MS Office Support
    Replies: 1
    Last Post: 17-05-2011, 01:58 AM
  4. Replies: 5
    Last Post: 18-03-2010, 02:28 PM
  5. word excel 2007 open slow
    By subhaash in forum MS Office Support
    Replies: 4
    Last Post: 21-01-2010, 02:30 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,442,052.06445 seconds with 17 queries