Results 1 to 5 of 5

Thread: Vb6- Move focus to PowerPoint

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2014
    Posts
    52

    Vb6- Move focus to PowerPoint

    The VB6 exe program is launched from an Excel add-in and is supposed to move the focus to an active and open PowerPoint presentation that should become the visible window.

    Code:
    With PPApp.ActiveWindow
        .ViewType = View
    End With
    PPApp.Activate

    While in IDE mode the focus moves properly and PowerPoint is the visible window. But in the compiled form (the exe file) the PowerPoint icon in the taskbar blinks but PowerPoint does not appear on top of Excel

    It seem that I have to find the handle of PowerPoint but don't know how to do it


    Using Office 2016

  2. #2
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,143

    Re: Vb6- Move focus to PowerPoint

    don't know all your code, but are you using:

    PPApp.Visible = True
    anywhere?

  3. #3
    Member
    Join Date
    Apr 2010
    Posts
    45

    Re: Vb6- Move focus to PowerPoint

    How about posting all of the code that automates PPT.

    Will this work with your current code approach?
    https://support.microsoft.com/en-au/...omation-server

    If you know the caption (text at top of PPT window) you might be able to use this approach:
    http://visualbasic.happycodings.com/...vba/code5.html

  4. #4
    Frenzied Member
    Join Date
    Mar 2008
    Posts
    1,210

    Re: Vb6- Move focus to PowerPoint

    Have no experience with Automating PowerPoint but xlApp.Caption works for me in Excel so;

    Try AppActivate PPApp.Caption

  5. #5

    Thread Starter
    Member
    Join Date
    Apr 2014
    Posts
    52

    Re: Vb6- Move focus to PowerPoint


Tags for this Thread

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