Jump to content
Macro Express Forums

activating a window


Recommended Posts

Hello,

I am having trouble with the activate window macro function, i've window activate, window show, set focus, etc. My window names change, I basically want it to find the program (wherever it is) and just bring it to front and focus on it. So if i want to see outlook, it finds it burried in a bunch of windows and brings it to the front and sets the focus.

What is the optimal way of achieving this?

Thanks,

Ali

Link to comment
Share on other sites

We have had a couple of really big discussions about this a couple years back in this forum. With applications like Outlook, the one I was having troubles with, it's not an easy feat because it uses MDI (Multi-Document Interface.) But others here, myself included, did come up with some solutions. Please check there.

  • Like 1
Link to comment
Share on other sites

We have had a couple of really big discussions about this a couple years back in this forum. With applications like Outlook, the one I was having troubles with, it's not an easy feat because it uses MDI (Multi-Document Interface.) But others here, myself included, did come up with some solutions. Please check there.

Hi Cory,

 

Thank you for the response, perhaps you can save me the trouble and guide me to where I can find my answer. Right now my "work around" is literally copy paste every iteration of the window in the "show/activate" function. I am sure there is a a more elegant solution. I was thinking it would be something like activate window "Inbox - *.* - Outlook" and it would activate any window with that front/end the same and whatever in the middle.

 

Thanks

Link to comment
Share on other sites

There's a search button in the upper right corner of the screen:-) I don't remember exactly when it was and I post a lot of stuff here so that's how I would find it. I would rather you spend the time looking up the solution for your problem than me.

Link to comment
Share on other sites

  • 2 weeks later...

There's a search button in the upper right corner of the screen:-) I don't remember exactly when it was and I post a lot of stuff here so that's how I would find it. I would rather you spend the time looking up the solution for your problem than me.

 

Hey Cory,

 

I found the solution, it wasn't on the forum. I noticed the forum's search function kinda sucks and it gives me many pointless hits. So I always ask because if you know, then great, if you don't then it's all good. If someone asks something and I know I always like to share the information because you don't really lose anything and if I am in their shoes i'd like to have someone just save me time and give me the information directly (more efficient).

 

So the solution was simply to just delete the parts you are not using. So if the window is "Inbox - email@email.com - Outlook" I would just have "- Outlook" as the window to be selected. Not perfect but close enough, very improbable that another window will be active that also has that ending. You can even have if window = "Inbox - " and "- Outlook" then do this... that way you can be "extra" sure it's the right window.

 

I'll mark my own post solved hehe

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...