A collection of different VBA modules for different applications in MS Office.
It's broken up by Office application, then Office file intention.
A speed test section is also included to test different approaches' processing speeds.
All documents contain annotations used by Rubberduck, an addon to the VBA editor adding lots of useful features, therefore "bringing it into the 21st century".
I'd also recommmend making a few adjustments to the VBA editor's settings as seen in this Stackoverflow comment.
BasicUtilitiescontains modules for automated clearing of specific part with prior confirmation and un-/protecting the document via bindable macro.Finders/DifferingEntriesFinder.baslists all entries in the active sheet's first column that aren't present in the first sheet's first column. Also copys results to clipboard.Finders/EntryEqualizer.basdeletes all entries in the active sheet's chosen column that aren't present in the first sheet's first column.Finders/UsedColumnsFinder.baslists all columns' headers in a text file, whose content isn't the same in every cell.Fixes/ZipCodesFix.basfixes the US state abbreviation letters being put in front of the zip code instead of after the city in a table with column names.Importscontains modules for importing boolean or string values as text info for entries in an Excel sheet from a text or excel file.InventoryUpdatingcontains modules for importing data from multiple CSV files with relevant data on the last line into a table in excel, creating a backup of the current worksheet before making changes.ProductionPlanningcontains modules for different calculations related to and needed for planning production, e.g. finding holidays and calculating production capacities.
Modules with the .cls extension have to go into the ThisOutlookSession module or have to be called from there to work.
BulkEditContacts.basallows for bulk-editing of contacts.DeleteSentFromSender.clsdeletes all mails of a specific sender address from the Sent folder permanently on Outlook startup.JunkMailBlackWhiteList.basforce-whitelists mails under specified conditions and blacklists all addresses in a provided (linebreak-separated) text file (because "normal" rules are limited in max number of mails).MoveFromFolderToFolder.basmoves all mails from one folder to another reliably one by one.MoveToCorrectSentFolder.clsmoves each sent email to the correct mailbox' Sent Elements folder. (Because per default they go into the main account's.)
There is also a registry fix for this.
AssignEmptyStringTest.bascompares different methods to create an empty string.AssignSpaceTest.bascompares different methods to create a string of a space.CompareNumberTest.bascompares different methods to compare a number to another.DoesStringStartWithTest.bascompares different methods to determine if a string starts with another string.DoesStringEndWithTest.bascompares different methods to determine if a string ends with another string.IsStringEmptyTest.bascompares different methods to determine if a string is empty.IsStringEqualToStringTest.bascompares different methods to determine if a string equals another string.IsStringInStringTest.bascompares different methods to determine if a string contains another string.
- For
Sequentially numbered copies,ThisDocument.docclsand either theMultiPage(MP) orSinglePage(SP) files need to be used to achieve a running number of printed pages on the page with the ability to set a starting value on print. BulkRegexReplace.basallows for bulk replacement of text in all documents in a folder and it's subfolders via multiple regexes.HotkeyActions.basadds a few actions I always use as subs so that, imported in theNormalproject, they can be given a hotkey for easy use. (File – Options – Customize the Ribbon – Keyboard shortcuts: Customize... – Scroll down and select "Macros" on the left)Unification.basallows for bulk unification of headers and/or format templates of all documents in a folder and it's subfolders.