automatically extracting information into outlook calendar from an email.

Ijaz Rexvi 1 Reputation point
2021-08-08T23:57:10.043+00:00

Hi all,

I would like to know a way where we can automatically upload/update outlook calendar from information provided from an email. For example the content of a mail would be

MR X has taken a day off from

date : dd/mm/yy : dd/mm/yy

I'd need this information to be uploaded into the calendar automatically. I tried using power automate but don't have share point to automate it. My employer uses MYOB and and when a leave request is approved, the manager would get a confirmation email, and adding this confirmation email into the shared calendar is the question. Any help regarding this would be appreciated.

regards,

Rex.

Outlook Management
Outlook Management
Outlook: A family of Microsoft email and calendar products.Management: The act or process of organizing, handling, directing or controlling something.
5,268 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jade Liang-MSFT 9,976 Reputation points Microsoft Employee
    2021-08-09T06:46:10.77+00:00

    Hi @Ijaz Rexvi ,

    Welcome to our forum.

    In the point of Outlook, there may be no option that could extract information from an email automatically. I have researched a lot about it and found we could try to create a rule to run any vba scripts in Outlook to meet similar needs.

    Based on my tests, we could create an appointment automatically based on specific subject(with keyword, Subject, Location, Date, Duration) of some messages by script like below.

    Message:

    121499-image.png

    Appointment:

    121557-image.png

    If it could meet your need, here are my detailed steps, for your reference:

    Paste the script in your Outlook vba (Alt + F11> Double-click "ThisOutlookSession">Paste the script):

    Public Sub WatchForAppt(Item As MailItem)  
    ' subject is arranged like this:  
    ' new appointment, subject, location, start date & time, duration  
    Dim objAppt As Outlook.AppointmentItem  
    Dim apptArray() As String  
      
    'split the subject at the comma  
    apptArray() = Split(Item.Subject, ",")  
    Set objAppt = Application.CreateItem(olAppointmentItem)  
      
    With objAppt  
      '  .MeetingStatus = olMeeting  
      '  .RequiredAttendees = Item.SenderEmailAddress  
        .Subject = apptArray(1)  
        .Location = apptArray(2)  
        .Start = apptArray(3)  
        .Duration = apptArray(4)  
        .Body = Item.Body  
        .Save  
       ' .Send  
    End With  
        Set objAppt = Nothing  
    End Sub  
    

    Create rule to run the script in some conditions(Rule>Manage Rule & Alerts>New Rule>Apply rule on message I receive>with specific word in subject, type your keyword in specific word field, in my case, it's "Leave Request">choose action"run a script" and choose your script)
    121510-image.png

    If you don't have the "run a script option" option, please try to create the register key in registry editor(Note: Serious problems can occur if you modify the registry incorrectly. Before making changes, back up the registry to restore it in case something goes wrong.)

    HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Security
    DWORD: EnableUnsafeClientMailRules
    Value: 1

    Besides, we need ask the sender to send the message with the specific format of subject like above (Keyword in your rule, Subject, Location, Date, Duration in minute), then it would create the corresponding appointment automatically.

    If your issue has any update, please feel free to post back.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.