Posts

Showing posts from 2024

VBA Terminate set app = NEW office applications after task complete (Zombie applications VBA), PIDs vs app.hwnd handles

  ''When launching excel from VBA inside another applicaiton like outlook, ''it doesn't end/kill cleanly. Excel.exe remains resident for some reason. ''This KILLS the excel, however the xcel.hwnd handle is nothte same as the ''PID needed to kill it''So this cleans out the the zombie applicaiton created ''by a set xcel = NEW excel.application #If VBA7 Then Declare PtrSafe Function GetWindowThreadProcessId Lib "user32" ( ByVal hWnd As LongPtr , lpdwProcessId As Long ) As Long Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( ByVal hWnd As LongPtr , ByVal lpOperation As String , ByVal lpFile As String , ByVal lpParameters As String , ByVal lpDirectory As String , ByVal nShowCmd As Long ) As LongPtr #Else Declare Function GetWindowThreadProcessId Lib "user32" ( ByVal hWnd As Long , lpdwProcessId As...

Outlook Report Email to Abuse@Domain & Move to Inbox/Abuse folder

So sick of spammers - here is a quick script to report back to Abuse@ their domain. The top 3 SUB routines can be fire VIA Alt+F8, rules, or Ad Macro to Toolbar  Attribute VB_Name = "AbuseForardTo" Option Explicit Option Compare Text Const vbqt = """" ''---------------------------------------------------------------------------- ''Email abuse and move original and send Public Sub ReportAbuse_NoPrompt_Send (): ReportAbuse 1 , True , False : End Sub ''---------------------------------------------------------------------------- ''Email abuse and move original and send, but set a delay Public Sub ReportAbuse_NoPrompt_Send_Delay (): ReportAbuse 1 , True , False , True : End Sub ''---------------------------------------------------------------------------- ''Start an abuse email Public Sub ReportAbuse_NoSend (): ReportAbuse 0 , False , False : End Sub ''------------...