-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainModule.bas
38 lines (23 loc) · 910 Bytes
/
MainModule.bas
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
Attribute VB_Name = "MainModule"
Option Explicit
#If VBA7 Then
Public Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As LongPtr) 'For 64 Bit Systems
#Else
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) 'For 32 Bit Systems
#End If
Public Sub main()
Dim filename As String: filename = SaveAllMailsAsTxt.SaveMailAs
Do
Dim fso As Variant
If fso.FileExists(filename) Then
Exit Do
End If
DoEvents 'Prevents from being unresponsive
Sleep 1000 '1 Second
Loop
Debug.Print "file available"
Call organizeMailsBySocken.Move_Items
Call SaveAttachment.GetAttachments
Call Shell("POWERSHELL.exe -noexit " & _
"""H:\Operations\REPORTS\Reports2018\Balance Sheet\SLmarginJE.ps1""", 1)
End Sub