motionvorti.blogg.se

Insight office for mac 365
Insight office for mac 365








  1. INSIGHT OFFICE FOR MAC 365 UPDATE
  2. INSIGHT OFFICE FOR MAC 365 CODE

Private Sub Application_Startup() Dim calFolder As Folder Dim CalItems As Outlook.Items Dim ResItems As Outlook.Items Dim sFilter As String Dim Appt As AppointmentItem 'Object Set calFolder = Session.GetDefaultFolder(olFolderCalendar) Set CalItems = calFolder.Items ' Sort all of the appointments based on the start time CalItems.Sort "" On Error Resume Next sFilter = " = Focustijd" Set ResItems = CalItems.Restrict(sFilter) 'Loop through the items in the collection. Also after the first restart of Outlook, you can change the color of the Category 'Focus Time' if you like. If yours is English, replace the 2 'Focustijd' pieces for 'Focus Time'. REMARK: Because somewhere in my profile my language is Dutch I had to change it to 'Focustijd'. So I made it as following, which you can just paste in ThisOutlookSession.

INSIGHT OFFICE FOR MAC 365 CODE

Now I would like to have this code ChangeInsights () to be started when Outlook starts. I really like the automatically planned focus time slots in my calendar, but the status 'busy' causes people to not being able to call me through Microsoft Teams during these time slots, which is a bit rigorously.

insight office for mac 365

SFilter = " >='" & Format(mystart, "m/d/yy") & "' AND = Focus Time" ' Change Insight's Focus Time Appointments I made a minor edit to the filter so I'm not sure what the issue is. I added the first block of code to a module so I could run it manually, however it doesn't work outside of running in it VBA. Open the VBA Editor by pressing Alt+F11 on your keyboard. (It's generally recommended to keep only the automatic macros in ThisOutlookSession and use modules for all other macros.) The instructions are below. Macros that run when Outlook starts or automatically need to be in ThisOutlookSession, all other macros should be put in a module, but most will also work if placed in ThisOutlookSession. In Outlook 2007 and older, look at Tools, Macro Security.Īfter you test the macro and see that it works, you can either leave macro security set to low or sign the macro. To check your macro security in Outlook 2010 and newer, go to File, Options, Trust Center and open Trust Center Settings, and change the Macro Settings. You can sign the macro when it is finished and change the macro security to notify. You could choose the option Notification for all macros, then accept it each time you restart Outlook, however, because it's somewhat hard to sneak macros into Outlook (unlike in Word and Excel), allowing all macros is safe, especially during the testing phase. The macros will not work with the top two options that disable all macros or unsigned macros. If you prefer to run it every time you restart Outlook, remove the If and End If lines so that it calls the CleanUpFocusTime every time Outlook is restarted.įirst: You need to have macro security set to the lowest setting, Enable all macros during testing. To run it on another day of the week, change the day name in the macro. When you restart Outlook on a Friday, the delete macro (above) runs. To automatically delete older Focus Time events, you can edit the ApplicationStartup macro. 'Sort all of the appointments based on the start time this code to delete Focus Time appointments more than 14 days in the past. If you want to remove older Focus Time appointments to tidy up your calendar. If InStr(Item.Subject, "Focus time") > 0 Then Private Sub CalItems_ItemAdd(ByVal Item As Object) Public WithEvents CalItems As Outlook.Items Use this macro to change the focus time events as they are added to the Calendar. 'Loop through the items in the collection. Set ResItems = CalItems.Restrict(sFilter)

insight office for mac 365

' Sort all of the appointments based on the start time Set calFolder = Session.GetDefaultFolder(olFolderCalendar) In this macro, I add the category "Focus Time", remove the reminder, and set the busy status to Tentative If you want ot automate it, you'll put it in ThisOutlookSession. If you are going to run the macro manually, put the macro in a new module and add a button for it to the ribbon or quick access toolbar. While its easy enough to run once a week after Insights generates the events, you could use a reminder to run it automatically.

insight office for mac 365

INSIGHT OFFICE FOR MAC 365 UPDATE

Although you can't change this through the Insights feature, you can use a macro to update the events in your calendar.










Insight office for mac 365