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 CleanTrim(ByVal S As String, Optional ConvertNonBreakingSpace As Boolean = True) As String | |
'https://www.mrexcel.com/forum/excel-questions/923725-vba-remove-all-non-printable-special-characters-well-trim.html | |
Dim X As Long, CodesToClean As Variant | |
CodesToClean = Array(0, 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, 127, 129, 141, 143, 144, 157) | |
If ConvertNonBreakingSpace Then S = Replace(S, Chr(160), " ") | |
For X = LBound(CodesToClean) To UBound(CodesToClean) | |
If InStr(S, Chr(CodesToClean(X))) Then S = Replace(S, Chr(CodesToClean(X)), "") | |
Next | |
CleanTrim = S |
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
Public referenceDocument As Document | |
Public lookupDocument As Document | |
Public activeDictionary As Object | |
Option Explicit | |
Sub createAcronymTableFile() | |
'##################################################################################################### | |
'# # | |
'# * Take table of abbreviations from existing document and use it as a separate reference # | |
'# * Takes ideas from a number of places # | |
'# * # |
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
Option Explicit | |
Private Type SHITEMID | |
cb As Long | |
abID As Byte | |
End Type | |
Private Type ITEMIDLIST | |
mkid As SHITEMID | |
End Type | |
Private Const CSIDL_PERSONAL As Long = &H5 | |
Private Declare Function SHGetSpecialFolderLocation Lib "shell32.dll" _ |
OlderNewer