+ Reply to Thread
Results 1 to 6 of 6

Switch focus back to Excel from Outlook

  1. #1
    Forum Contributor
    Join Date
    05-30-2013
    Location
    France
    MS-Off Ver
    2010
    Posts
    260

    Switch focus back to Excel from Outlook

    Hi,

    I'm using Excel to import mails from Outlook into a spreadsheet. Code works fine but I'd like to switch the focus between the windows so the user understands what's going on. Here's my code :

    Please Login or Register  to view this content.
    The visible method shows Outlook but I would like to only show the PickFolder box on top of Excel. Then I've tried using olApp.Visible = False, AppAtivate("Microsoft Excel"), olApp.WindowState = olMinimized but none of these work or have the intended effect.

    Any ideas ?

    Thanks,
    amphi

  2. #2
    Registered User
    Join Date
    09-10-2014
    Location
    Matrix
    MS-Off Ver
    2010
    Posts
    70

    Re: Switch focus back to Excel from Outlook

    Hi,

    Let's try WScript.

    Please Login or Register  to view this content.
    (*) Reputation points appreciated.
    excelbs.tk

  3. #3
    Forum Contributor
    Join Date
    05-30-2013
    Location
    France
    MS-Off Ver
    2010
    Posts
    260

    Re: Switch focus back to Excel from Outlook

    Thanks michson. (Discover new things everyday). Won't running a script to an already open application interfere with them though ?

  4. #4
    Forum Contributor
    Join Date
    05-30-2013
    Location
    France
    MS-Off Ver
    2010
    Posts
    260

    Re: Switch focus back to Excel from Outlook

    After googling around this is where I've gotten to :

    Please Login or Register  to view this content.
    Is there any way to activate the workbook my procedure is running on ? Right now it's maximizing the Excel application with no workbooks showing.

  5. #5
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Switch focus back to Excel from Outlook

    Did you try just using
    Please Login or Register  to view this content.
    after your original code?
    Remember what the dormouse said
    Feed your head

  6. #6
    Forum Contributor
    Join Date
    05-30-2013
    Location
    France
    MS-Off Ver
    2010
    Posts
    260

    Re: Switch focus back to Excel from Outlook

    I did but with varying results. In addition this doesn't show Outlook when I call the PickFolder method.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA UserForms and Focus back to Excel
    By Paluee in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 11-15-2010, 11:17 PM
  2. Getting excel to switch back to a workbook?
    By cuewoz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-25-2009, 05:51 AM
  3. Force focus back to Excel?
    By JP Romano in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-18-2009, 05:30 PM
  4. [SOLVED] How do I get focus back on an Excel file?
    By Stumpiana in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 11-17-2005, 09:25 PM
  5. How do I get focus back on an Excel file?
    By Stumpiana in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-17-2005, 05:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1