-
Notifications
You must be signed in to change notification settings - Fork 0
/
vbscript code
45 lines (34 loc) · 1.21 KB
/
vbscript code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Dim WithEvents myolapp As Outlook.Application
Private Sub Application_Startup()
MsgBox "Welcome, " & Application.GetNamespace("MAPI").CurrentUser
Initialize_reminder_handler
End Sub
Sub Initialize_reminder_handler()
Set myolapp = Outlook.Application
End Sub
Private Sub myolapp_Reminder(ByVal Item As Object)
SendToJoinAPI Item
End Sub
Private Sub SendToJoinAPI(ByVal Item As Object)
Dim myLocation As String
Dim myStart As String
Dim mySubject As String
Dim myURL As String
If Item.Class = olAppointment Then
myStart = Item.Start
mySubject = Item.Subject
myLocation = ""
If Item.Location <> "" Then
myLocation = " in " & Item.Location
End If
myURL = "https://joinjoaomgcd.appspot.com/_ah/api/messaging/v1/sendPush?text=You%20have%20a%20meeting" & _
myLocation & "%20at%20" & _
myStart & _
"&title=" & mySubject & _
"&deviceNames=aaabbbccc&apikey=dddeeefff"
With CreateObject("MSXML2.XMLHTTP")
.Open "GET", myURL, False
.Send
End With
End If
End Sub