sharkoz / keypirinha-outlook_calendar

Allows you to view upcoming events in your outlook calendar from keypirinha, and to join a teams meeting if available
MIT License
5 stars 1 forks source link

[Feature request] Add functionality for link to outlook item itself #4

Open kamilkrz opened 2 years ago

kamilkrz commented 2 years ago

Hi, My ideal usecase is to have a possibility to jump to calendar item itself (often to change my availability or invite someone else). I dug a bit and working solution is to get app.EntryID in loop and give possibility to run it like: "C:\Program Files\Microsoft Office\root\Office16\OUTLOOK.EXE" /select outlook:app.EntryID there are some other options that involve messing with registry to enable outlook: links to work (same mas msteams:) but that was easiest one and works even in restricted environment. Adding this will be huge upgrade. Giving option to choose default action (open meeting / open cal item) will be even more useful.

Thanks a lot as I am using this tool every day!

kamilkrz commented 2 years ago

So as I for now have no clue about keypirinha plugin structure this is very quick and VERY dirty proof of concept. I changed default behavior to open in outlook as not every meetings has teams link (other services or even offline). Path to outlook is now hardcoded and data_bag for item is ugly as hell because I gave no time to investigate correct use case.
https://github.com/kamilkrz/keypirinha-outlook_calendar/blob/feature/open-link-in-outlook/src/outlook_calendar.py But still it is example to some point as its working. I will be more than happy to dig in future how to proper handle other services like zoom etc.

sharkoz commented 2 years ago

Hello Can you try this code to open the event, instead of the exe shell_execute :

outlook = com.CreateObject("Outlook.Application", dynamic=True).GetNamespace('MAPI') outlook.GetItemFromID(outlook_link).Display()

I believe it works as you'd like, but I appreciate your feedback before going further

kamilkrz commented 2 years ago

Totally this looks more like appropriate solution. Works even with closed outlook so same like searching through events.

kamilkrz commented 2 years ago

Ok. Thing to investigate. Canceled meetings are correctly marked but link generated actually leads me to first message. That is important cause one of use case is to quick get access to updated event to remove it from calendar. So still some work needed