This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Public Sub EXTRACT_INFORMATION() | |
| Dim var1, var2, var3, var4, WL, em, WLC, oFSO, oFS, fso, bstring, When, var5 As String | |
| Dim MsgCount, var6, var7, var8, var9, ErrCheck, var10 As Integer | |
| Dim rrVar, lrVar, rdVar, ldVar, lsVar, rsVar, lc, Target | |
| Dim oMailS As Outlook.MailItem | |
| ' -------------------------------------------------------------------- | |
| Set objOutlook = CreateObject("Outlook.Application") | |
| Set objNameSpace = objOutlook.GetNamespace("MAPI") | |
| Set objFolder = Application.ActiveExplorer.CurrentFolder.Items | |
| Set colItems = objFolder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ' Canned reply using external html | |
| Public Sub PREFAB_REPLYNew() | |
| Dim oMailReply, oMailSelect As Outlook.MailItem, Keyword5 As String | |
| Dim oFSO, oFS, BodyText, SubjString, EmpFirst, EmpLast, BodyReply | |
| If Application.ActiveExplorer.Selection.Count Then | |
| If TypeOf Application.ActiveExplorer.Selection(1) Is Outlook.MailItem Then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Public Sub servers() | |
| On Error GoTo errHandler | |
| Dim db_Name As String | |
| db_Name = ("c:\servers.mdb") | |
| Dim DB_CONNECT_STRING As String | |
| DB_CONNECT_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ | |
| "data Source=" & db_Name & ";" & ", , , adConnectAsync;" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ' Save files as mht file to storage device | |
| ' Highlight the messages to archive and then run script | |
| Public Sub samht() | |
| Const olFolderInbox = 6 | |
| Dim i As Integer | |
| Dim k As Integer | |
| Dim m As Integer | |
| Dim x As Integer | |
| Dim CU As String | |
| Dim strFName As String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'Clear annoying stationary in an email | |
| 'tested with Office 2003, office 2007 and Office 365 | |
| 'Highlight the message and then run the script | |
| Sub ClearStationeryFormatting() | |
| On Error GoTo ClearStationeryFormatting_Error | |
| Dim strEmbeddedImageTag As String | |
| Dim strStyle As String | |
| Dim strReplaceThis As String | |
| Dim intX As Integer, intY As Integer | |
| Dim myMessage As Outlook.MailItem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Public Sub SaveAttachments() | |
| Dim objOL As Outlook.Application | |
| Dim objMsg As Outlook.MailItem 'Object | |
| Dim objAttachments As Outlook.Attachments | |
| Dim objSelection As Outlook.Selection | |
| Dim i As Long | |
| Dim lngCount As Long | |
| Dim strFile As String | |
| Dim strFolderpath As String | |
| Dim strDeletedFiles As String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| # Don't forget to add this script to your cron | |
| logfile="/var/log/conky_check.log" | |
| case "$(pidof conky | wc -w)" in | |
| 0) echo "conky found not running, (re)starting conky: $(date)" >> $logfile | |
| DISPLAY=:0 /home/user/.conky/conky_start & |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Useful for purging security camera folders | |
| # 1 0 * * * = Run at 12:01a every day | |
| # -name '2018*' just means - find all folders that start with 2018 | |
| # -type d = folders | |
| # -mtime +20 = modified 20 days ago | |
| 1 0 * * * /bin/find /home -maxdepth 3 -name '2018*' -type d -mtime +20 -exec rm -rf {} \; -print >> /root/purge.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Option Explicit | |
| Sub CLEARDATA() | |
| On Error GoTo ErrHandler | |
| Dim arrSHEETS As Variant | |
| Dim wsheets As Variant | |
| arrSHEETS = Split("Alpha,Bravo,Charlie,Delta,Echo,Foxtrot,Golf,Hotel", ",") | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub Auto_Close() | |
| ThisWorkbook.Saved = True | |
| End Sub |