Results 1 to 3 of 3

Thread: Another Excel / Word Question....

  1. #1

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

    Question

    Now...Is there a way to "SetFocus" to the Word window?
    (I know I can use AppActivate..) But I want to Be able to Switch to WOrd without having to give the Title in Appactivate.

    (Because sometimes it has the word (copy) on the end of the title...and I need to pull it up either way)
    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
    Use objWord.Activate

    i.e.

    Code:
    Private Sub Workbook_Open()
        Dim objWord As Word.Application
        Set objWord = New Word.Application
        
        With objWord
            .Documents.Open "C:\MyDoc.doc"
            .Visible = True
            .Activate
        End With
    End Sub
    Some advice: When you type the ".", it will give you a list of possible events, methods, and constants you can use. The only way of finding this stuff out is by trying a few that look like they may do the job.

    Good luck!

  3. #3

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

    Question cool

    .Activate
    Cool.

    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