Skip to content

Instantly share code, notes, and snippets.


Arne Steen ArneS

  • Oslo
View GitHub Profile
ArneS / Digit to unicode superscript
Created May 13, 2015
Javascript function to return unicode superscript digits. Handy for writing on html canvas
View Digit to unicode superscript
function digitToUnicodeSupercriptDigit(n) {
subst = [176,185,178,179,0x2074,0x2075,0x2076,0x2077,0x2078,0x2079]
return String.fromCharCode(subst[n]
ArneS / RemovePatternFromAttachmentFilename
Last active Aug 29, 2015
Outook 2010 VBA macro to remove string patterns from filenames of attachments.
View RemovePatternFromAttachmentFilename
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.
regEx.Pattern = strPattern
Dim message As Outlook.MailItem
Dim attac As Attachment
Dim i As Long
You can’t perform that action at this time.