September 11, 2020

Outlook to Teams Group Chat (VBA)

The integration between Microsoft Outlook and Microsoft Teams has still room for improvement.
(Right now you can forward and email to a channel using the channel email and share a conversation from Teams by email)
The nice Reply with IM only opens a chat with the From recipient. (1-1 chat) and with Reply All with IM it replies to all Recipients in To AND Cc. Also the name of the chat does not reflect the outlook item subject (contrary to Skype IM integration)
A common use case is from an Email or a Meeting you want to generate a Group Chat with the same list of recipients.
I present here a workaround based on VBA.

This post is a Work-In-Progress and will be continuously improved based on the interest/ comments.
  

How to install

The main VBA code is located here https://github.com/tdalon/outlook-vba.
You need to import the 3 modules:
Item2TeamsChat.bas (this is the main part of this feature)
Utils.bas (uses the GetCurrentItem, OpenLink and CopyClipboardHTML functions) 
MsgBoxCustom_Mod.bas for the custom MsgBox as shown in the How to use section.

You can add a custom button e.g. in your QAT or Toolbar to run the macro. 
The macro it shall point at is: Item2Chat_Callback

Behind the coding scene

It is mainly based on the deep link feature in Teams.
The VBA code makes a loop over the Recipients and aggregates the Email list into the url.

How to use

The macro works on the selected item:
it can be either the email/meeting opened in a separate Window, or an email selected in the inbox or a meeting selected in the calendar view.

You will be prompted to edit the chat name.
(You can still change it after the group chat is not in draft anymore in Teams)


You will be prompted if you want to include All the recipients or not the optional / Cc ones.


At the end a group chat will be created with all the the recipients included and the input chat name preset.

Note it is still in DRAFT mode. (and it is good so, so you can adjust for example the recipient list or cancel it)

There are some limitations if the number of recipients is too long. (But for such cases I would anyway recommend a pull approach rather than push. who is still using emails for informing xxx people is doing sthg wrong TMO)

Bonus - Generate Link

You can also generate a teams link chat from outlook to past for example somewhere else as contact entry e.g. for a support group using the intermediary function CopyItem2TeamsMeetingLink.

References

Deep Links (Microsoft Docs)

How to add a macro to a button:  SlipStick on YouTube

No comments:

Post a Comment