Forum Discussion
VBA Issues in Windows 11?
- Aug 06, 2022Solved! It appears that during the installation of Office 365 on my new Windows 11 laptop, the Action Queries check box in Options -> Client Settings is disabled by default. This affected all databases on my laptop. I enabled it and all works fine.
- metzmattJun 17, 2024Copper Contributor
Ken,
I too have experienced some issues with VBA code in Outlook 365 that works on my W10 machine but not on either of my W11 machines. Some of the macros work (such as macros to do a unified search for all inboxes, or all trash, etc.). But there is Sub that was designed to recognize when an appointment was added to my calendar: if the subject includes "CM" set the busystatus to FREE and turn off the reminder.
The code for this sub is pasted below.
Your posting suggests something about Client Settings in Action Queries/Options. But as an amateur, I don't understand where to access these settings. A search of my computer for "Client Settings" or "Action Queries" comes up empty. Do these values relate to some sort of administrator program I'm not using on my Windows 11 Pro machine?
Or do you see something else in the script below that accounts for why this works in W10 but not W11?
Subroutine for Calendar:
Private Sub Items_ItemAdd(ByVal Item As Object)
On Error Resume Next
Dim Appt As Outlook.AppointmentItemIf TypeOf Item Is Outlook.AppointmentItem Then
Set Appt = Item
'Checks to see if all day and if it has a reminder set to true
If InStr(1, Appt.Subject, "CM", 1) > 0 ThenWith Appt
.BusyStatus = olFree
.ReminderSet = False
.Save
End With
End If
End If
End Sub- Tom_van_StiphoutJun 17, 2024Iron Contributor> I don't understand where to access these settings.
File > Options.
While you're there, also go in the Trust Center and add a Trusted Location for your database folder.- Ken_RavazzoloJun 17, 2024Copper ContributorThanks Tom!