Results 1 to 4 of 4

Thread: Excel Open a Word Doc

  1. #1

    Thread Starter
    eltiT resU motsuC Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Unhappy

    I need to know how to get Excel to open a word document...

    Basically When Excel opens I nedd to have word open also and load a certain Document. I know i could Dim X as Object then set object = ("Word.application") etc...but is there a way to load the document right then?

    Thanks!
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  2. #2
    Fanatic Member Gaffer's Avatar
    Join Date
    Nov 2000
    Location
    London
    Posts
    828
    Try this:

    Code:
    Private Sub Workbook_Open()
        Dim objWord As Word.Application
        Set objWord = New Word.Application
        
        With objWord
            .Documents.Open "C:\MyDoc.doc"
            .Visible = True
        End With
    End Sub
    Hope this helps

  3. #3
    Fanatic Member Gaffer's Avatar
    Join Date
    Nov 2000
    Location
    London
    Posts
    828
    and don't forget to register the Word Object libarary in the references!!!

    and don't eat with your mouth open....

  4. #4

    Thread Starter
    eltiT resU motsuC Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Thumbs up Thanks....Perfect

    Thant work....Thanks
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width