Results 1 to 7 of 7

Thread: Launch Word

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    9

    Question

    Hey everyone,
    I need a little bit of code help. When the user clicks on a command button, I want windows to launch a new word document. Any help?

    Thanks in advance
    Justin




  2. #2
    Lively Member
    Join Date
    Mar 2000
    Location
    Fort Lauderdale, FL USA
    Posts
    112
    Dim oWord As New Word.Application

    Set oWord = CreateObject("Word.Application")
    oWord.Visible = True
    oWord.Activate
    Damonous

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    9

    Post damonous

    Thanks for the reply....Do I put that command in the button, or form load, or form activate. Thanks
    Justin

  4. #4
    Guest
    Yes, put that into a CommandButton.

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    9
    Thanks everyone

  6. #6

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    9
    Sorry to be such a pain and I am trying to do this on my own, but I keep getting a user defined type error when I run the code.
    Thanks again
    Justin

    Private Sub CmdItem_Click()
    Dim oWord As New Word.Application

    Set oWord = CreateObject("Word.Application")
    oWord.Visible = True
    oWord.Activate


    End Sub

  7. #7
    Lively Member
    Join Date
    Mar 2000
    Location
    Fort Lauderdale, FL USA
    Posts
    112
    Sorry, I forgot to mention that you need to reference the Word 8.0 Object Library.

    Menu Path: Project > References

    Then find the Microsoft Word 8.0 Library and check the box next to it. Press the "OK" button.

    Enjoy.
    Damonous

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