Hello,
it is possible to make VBA code to activate MS Teams window every 5 minutes from Excel?
Please help,
Jacek
Hello,
it is possible to make VBA code to activate MS Teams window every 5 minutes from Excel?
Please help,
Jacek
probably not. is MS Teams open at the time you want to send the focus to it's window? program windows, those of programs actually open at the time VBA code runs, are referred to in the professional community as handles. the coding standard that is always written to refer to them, which technically are called pointers, looks like this:
and you'll have to use windows API logistics, because MS Teams more than likely doesn't have a VBA library that you can hook into with excel. MS doesn't care about helping people out like that because the request is so unique. they're not going to waste time doing it if it doesn't satisfy a billion people who are buyers.![]()
Please Login or Register to view this content.
happy thanksgiving to you. all holidays are wonderful. what a break from this world we live in. much needed....
here's a wonderful, but heavily complex example of calling DLL functions using VBA. these are called API calls:
https://renenyffenegger.ch/notes/dev.../Win-API/index
if you COULD do it with VBA alone and a built-in library, other things that are relevant are things called z-index, focusing, and what I already mentioned: handles. Teams has many functions in it, but they are native internally to it only, per the image I took below with my own installation of it:
Last edited by vba_php; 11-26-2020 at 10:52 AM.
You can do it using AppActivate but you need to know the actual window caption at the time (which will vary depending on what channel the user is looking at currently). The ActivateMicrosoftApp method hasn't had an enum added for Teams as far as I know, and I can't get Word's Tasks collection to activate Teams as yet.
Everyone who confuses correlation and causation ends up dead.
rorya,
teams is newer. it doesn't, apparently. it only has enums for the basics:
https://docs.microsoft.com/en-us/off...lmsapplication
per:
https://docs.microsoft.com/en-us/off...temicrosoftapp
Ok Guys,
thank you!
Rory so AppActivate will not work for now yes it we do not have enum implemented yet?
And vba_php - thanks and all the vest for you also!
So API calls can handle it somehow? IT is possible? Sorry i try to understand from your post it is or not
JAcek
correct. not in the way he was mentioning.
i've been doing this work for 2 decades. what I said was very complicated. yes you can do it, I'm sure. however, if you don't have heavy programming knowledge, you will probably have to pay a professional to have it done. the concept of API, when making the windows OS talk to any language that's installed, is very complex for non technical people, and most of the code is written in an older fashion (using bits/bytes, hex numbers, binary numbers, etc, etc....)
Thank you Guys - eveything is to do vba_php if you have time.
But i do not have and do not like using windiws Api idea from VBA - i will look after another solution
Jacek
I mean that if i would time i would do this - but getting with tones of documentation is not for me now.
I had hop that it is easier to achevie![]()
Jacek
oh I see. so you are going to attempt it if you have time. well good! good luck to ya.
thanks!
Jacek
thanks Rory,
yes so i should to loop trough windows handles and find Teams characteristic via API calls.
Jacek
If you like. Why do you want to do this? Seems really annoying to me.
To be active not away from computer.
Jacek
You could try this - it seems to toggle the status for me:
then use application.ontime to schedule it.![]()
Please Login or Register to view this content.
o wow you are master Rory!
thanks
why Word appliatin is working here?
Jacek
Word has a Tasks object for running processes, which Excel doesn't.
Thank you Rory!
Jacek
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks