This file contains 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
function digitToUnicodeSupercriptDigit(n) { | |
subst = [176,185,178,179,0x2074,0x2075,0x2076,0x2077,0x2078,0x2079] | |
return String.fromCharCode(subst[n] | |
} | |
This file contains 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 RemovePatternFromAttachmentFilename() | |
Dim strPattern As String: strPattern = "^[0-9]{3,12}[_][0-9]{1,3}[ ]" ' Matches e.g. "123456_2 Example file.docx" | |
Dim strReplace As String: strReplace = "" | |
Dim regEx As New RegExp ' RegExp needs to be enabled. http://stackoverflow.com/questions/21139938/vba-regexp-causes-compile-error-while-vbscript-regexp-works | |
regEx.Pattern = strPattern | |
Dim message As Outlook.MailItem | |
Dim attac As Attachment | |
Dim i As Long |