Results 1 to 3 of 3

Thread: open word help????

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2000
    Posts
    81

    Post

    i would like to know how to open a file within word
    i already know how to open microsoft word but not a file
    any ideas say for eg the file name is john.doc how would i open it
    thanks
    eek eek eek:ekk:

  2. #2
    Fanatic Member
    Join Date
    Oct 1999
    Location
    MA, USA
    Posts
    523

    Post

    Maybe this will help:
    Code:
        Dim wrdApp As Object
        
        Set wrdApp = CreateObject("Word.Application")
        wrdApp.Visible = True
        wrdApp.documents.open filename:="C:\Johnny23.doc"
        Set wrdApp = Nothing
    ------------------
    Visual Basic Programmer
    ------------------
    PolComSoft
    You will hear a lot about it.


  3. #3
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670

    Post

    You can cheat a lot by doing this

    X=Shell("START MyDoc.DOC",1)

    This'll open whatever application is currently linked to .DOC files (normally Word). There are better ways to do this via API calls and a quick search of the Tips section of this site should unearth them.



    ------------------
    Mark "Buzby" Beeton
    VB Developer
    [email protected]



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