VBA - Create Outlook meeting without MS Teams link (SendKeys?)

Prinny

New Member
Joined
Oct 24, 2015
Messages
14
Hi all,

I am building a scheduler in Excel to create meetings in Outlook. We have a rota created in Excel and I am using VBA to go through the list and create/send meeting invites in Outlook.

I have most of the code working fine. Excel is creating the meeting invites and adding the details and attendees correctly. The only issue I have is that Outlook automatically sets up the meetings as an MS Teams Meeting with 'join online' links. The meetings I am scheduling are all face-to-face so MS Teams is not needed. Even if I specify a location, it still shows up as a Teams meeting too.

I've found a similar question online where they wanted to enable Teams and used SendKeys so I thought I would do the same to disable Teams.
I am using Office 365 and a UK keyboard so my shortcuts for this in Outlook are F10, H, Y3 (this is the equivalent to pressing the 'Don't host Online' button on the ribbon.

I have added this code to my macro but it isn't working:

SendKeys "{F10}", True
SendKeys "H", True
SendKeys "Y3", True

I don't have any errors but the meeting invites still show up as MS Teams meetings.

I also tried adding separate lines for "Y" and "3" but it made no difference.

We send out 300 meeting invites at a time so I would prefer not to have to display and manually click 'don't host online' if possible!

Can anyone show me what I'm doing wrong or suggest another way to make the meetings not have the Teams link?
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Try
VBA Code:
SendKeys "{F10}", True
SendKeys "H", True
SendKeys "MR", True
SendKeys "M", True
 
Upvote 0
Try
VBA Code:
SendKeys "{F10}", True
SendKeys "H", True
SendKeys "MR", True
SendKeys "M", True

Thank you for replying!

Unfortunately this didn't work but I have managed to solve it by adding a one second wait between each line. I'm not sure why but Outlook wasn't registering the entries.

In case anyone has a similar question in future, I used:

.display 'display meeting request in Outlook
Application.Wait (Now + Timevalue ("0:00:01"))
SendKeys "{F10}", True
SendKeys "H", True
Application.Wait (Now + Timevalue ("0:00:01"))
SendKeys "Y", True
Application.Wait (Now + Timevalue ("0:00:01"))
SendKeys "3", True
Application.Wait (Now + Timevalue ("0:00:01"))
SendKeys "^~", True 'sends the email
 
Upvote 0
Solution
Hi all,

I am building a scheduler in Excel to create meetings in Outlook. We have a rota created in Excel and I am using VBA to go through the list and create/send meeting invites in Outlook.

I have most of the code working fine. Excel is creating the meeting invites and adding the details and attendees correctly. The only issue I have is that Outlook automatically sets up the meetings as an MS Teams Meeting with 'join online' links. The meetings I am scheduling are all face-to-face so MS Teams is not needed. Even if I specify a location, it still shows up as a Teams meeting too.
How does this happen? I am desperate for this functionality - I want to be able to lots of meetings through Excel, all of which are automatically set up as Teams meetings with links etc. Currently, the only way I can begin to automate this is through sendkeys - but, as great as it is, it breaks down if you try to loop it through multiple meetings...
 
Upvote 0

Forum statistics

Threads
1,214,545
Messages
6,120,128
Members
448,947
Latest member
test111

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top