Results 1 to 6 of 6

Thread: Open Word

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    15

    Question

    Does anyone have code that will open a word doc from Excel?
    Thanks!!!
    Confused

  2. #2
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008
    You could use CreateObject(...) - slow

    or, quicker

    Dim myWord As Word.Application
    Set myWord = New Word.Applicationn etc.
    (but you'll need a reference to the Word library to do this)

    Cheers,

    Paul.
    Not nearly so tired now...

    Haven't been around much so be gentle...

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    15

    Question

    I know this is basic but ..... if the word document you want to open already exists can you reference that in your code?
    Confused

  4. #4
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008
    Yes, use

    Code:
    Dim wObj As New Word.Application
     
    wObj.Documents.Open FileName:="MyDoc.doc"
    Cheers,

    Paul.
    Not nearly so tired now...

    Haven't been around much so be gentle...

  5. #5

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    15
    Many Thanks!!
    Confused

  6. #6
    Hyperactive Member tumblingdown's Avatar
    Join Date
    Mar 2000
    Posts
    362
    Oi! Paul! pack it in with that in-line New ****. You early binding bas*ard!


    ;-)


    Beer on friday.

    td.
    "One logical slip and an entire scientific edifice comes tumbling down." - Robert M. Pirsig


    tumblingdown@hotmail.com

    "but if Einstein is right and God is in the details, reality requires that we sometimes get religion." - Scott Meyers.

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