Results 1 to 3 of 3

Thread: Starting Word97?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    17

    Talking

    What VB script can I use to open a Word document from Access? I've tried some techniques, but none seem stable...Any ideas? thanks.

  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367
    While in the code screen you can add references, so add one for the Microsoft Word Object.

    Code:
    Private Sub Command0_Click()
    Dim Wrd As Word.Application
    Set Wrd = CreateObject("Word.Application")
    Wrd.Documents.Open "C:\test.doc"
    Wrd.Visible = True
    End Sub
    You can also use the word object to modify the document through code.

    Hope this helps,

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    17
    Yes thank you. I also discovered a most helpful document that should help anyone with anything regarding VB and Word.
    The final code is very similar to yours.

    If any one is interested:

    http://msdn.microsoft.com/library/of...97/web/007.htm


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