Making Outlook Use a Fixed-Width Font (like Courier) for Plain-Text Emails

I don’t recall having this problem before Office 365 (eg: Microsoft Office 2013 & 2016), but recently noticed my text-only emails were being displayed in the Calibri font 🤮

Most of my plain-text email come in as system-generated plain-text notifications and a fixed-width font simply makes them easier to read.

Here is how to adjust those settings…

File > Options > Mail > Stationery and Fonts

Under “Composing and reading plain text messages” change the font to your desired fixed-width of preference.

My go-to is Courier New 10pt on a 1920×1080 resolution display. Simply tweak the font settings for the desired display result.

You may need to switch which email you’re viewing between adjustments as this did not update on-the-fly when I was changing them for the selected email message šŸ˜‰

Convert Your Mac QuickBooks Company to a QuickBooks for Windows Backup (QBB) and Vice Versa

  1. Open your QuickBooks company as the admin on the Mac.
  2. Open the File menu, select Export, then To QuickBooks for Windows.
    • If prompted to Verify before backing up, do it.
  3. Choose a location for the new QBB file, then click Save.
  4. Confirm all remaining prompts.
  5. Copy the QBB file to a Windows PC.

How to Restore a QuickBooks Backup File (QBB) on Windows

  1. Open QuickBooks.
  2. Open the File menu, then Open or Restore Company…
  3. Select Restore a backup copy then click Next.
  4. Select Local backup, then click Next.
  5. Select the QBB file, click Open, then Next.
  6. Choose a folder and name for the new QBW, then click Save.
    • Do not overwrite another file unless you are sure it is safe.
  7. If no errors were encountered After the QuickBooks data has been restored, proceed as usual.

How to Restore a QuickBooks Backup File (QBB) on Mac

If someone like your accountant will be making changes to your QuickBooks data, then sending the updated company file back to you, follow these steps after the updated backup is returned to you.

  1. Copy the QBB file to your Mac PC.
  2. Open QuickBooks for Mac.
  3. Open the File menu, then Open Company.
  4. Select the QBB file, then click Open.
  5. Click OK when prompted to restore the file.
  6. Enter a name for the new company file, then click Save.

If you encounter any problem during the backup and restore process, you may need to contact Intuit’s QuickBooks Support for troubleshooting information.

Caps Lock Alert for Password Input Fields

<input type="password" id="password">
<span id="warning" style="display:none;color:#c00">[Caps Lock]</span>
<script>
document.getElementById("password").addEventListener("keyup", function(event) {
  document.getElementById("warning").style.display = (event.getModifierState("CapsLock")) ? "inline" : "none";
});
</script>

Replace Bootstrap’s JavaScript Form Validation with jQuery Equivalent – Plus Focus First Invalid

I tend to implement Bootstrap > Documentation > Components > Forms > Validation but feel it makes sense to use jQuery since it is required by many Bootstrap components 🤷‍♂️

Code to replace provided example…

$('.needs-validation').submit(function(event) {
    if ($(this)[0].checkValidity() === false) {
        event.preventDefault();
        event.stopPropagation();
    }
    $(this).addClass('was-validated');
    $('.form-control:invalid')[0].focus();
});

Note: That last line focuses on the first invalid field 😉

Original Bootstrap Javacript example…

(function() {
    'use strict';
    window.addEventListener('load', function() {
        var forms = document.getElementsByClassName('needs-validation');
        var validation = Array.prototype.filter.call(forms, function(form) {
            form.addEventListener('submit', function(event) {
                if (form.checkValidity() === false) {
                    event.preventDefault();
                    event.stopPropagation();
                }
                form.classList.add('was-validated');
            }, false);
        });
    }, false);
})();

Suggestions or improvements? Comment below 😊

Excel VBA

VBA EXCEL: Duplicate Comments to Matching Cells of Another Spreadsheet in the Same Workbook

I have an Excel workbook with 13 protected sheets, January through December plus a Summary that needed the same cell comments for each month.

There were 2 options…

  • Type comments into each sheet manually; then update 11 sheets (Feb-Dec) by hand whenever comments need changing 😬
  • Add VBA code to the workbook that automatically duplicates cell comments from January (unprotected) to February through December (protected) when those sheets are activated 😎
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
    Dim xSheetProtected As Boolean
    
    'Can add Case conditions for varying sheet passwords
    Select Case Sh.Index
        Case 1
            'Unprotected
            xPassword = ""
        Case Else
            xPassword = "Pa$$w0rd"
    End Select
    
    If Sh.ProtectContents Then
        If xPassword = "" Then
            MsgBox "Missing password for protected sheet!", vbExclamation
            Exit Sub
        Else
            xSheetProtected = True
            On Error GoTo Invalid_Sheet_Password
            Sh.unprotect Password:=xPassword
        End If
    End If
    
    'Copy January header cell comments to February-December
    If Sh.Index > 1 And Sh.Index < Application.Sheets.Count Then
        'Columns containing comments (eg: row 3)
        For Each xCell In Worksheets(1).Range("3:3")
            If xCell.Text <> "" Then
                Range(xCell.Address).ClearComments
                If Not xCell.Comment Is Nothing Then
                    Range(xCell.Address).AddComment xCell.Comment.Text
                End If
            Else
                'Stop on empty cell
                GoTo Workbook_SheetActivate_End
            End If
        Next
    End If

Workbook_SheetActivate_End:
    If xSheetProtected = True Then
        Sh.Protect Password:=xPassword
    End If
    Exit Sub

Invalid_Sheet_Password:
    MsgBox "Password provided for """ & Sh.Name & """ sheet does not match!", vbExclamation, "Invalid Password"
    Exit Sub
    
End Sub

If you got this far, I assume you can follow VBA code. That said, the code should be self-explanatory with my code comments are naming conventions 😉

How to Whitelist Emails & Domains in Outlook.com (MSN, Hotmail, Live, etc)

You ever go looking for an email only to find it in your Junk Mail folder? Here are a few ways to whitelist senders and/or domains avoid the issue.

Individual Messages

This method effectively whitelists the sender of a single message and moves it to your “Inbox” folder.

  1. Open your Junk Mail folder
  2. Right-click the message
  3. Choose “Mark as not junk”

TIP: You can also “Block” senders from the same menu 👍

Manually Whitelist Emails and Domains

If you expect to trust all emails from a particular domain (accountants, banks, etc) you can whitelist their entire domain. This way, regardless of who is sending, any email from their domain will be treated as “Not Junk” and be delivered to your “Inbox” folder

  1. Click the “Gear” icon (top-right of window)
  2. Click “View all Outlook settings”
  3. Click “Mail”
  4. Click “Junk email”
  5. Click “+ Add” under “Safe senders and domains”
  6. Enter the email address or domain
    • You can enter email@domain.com to add a sender, or domain.com to whitelist all senders from that domain.
  7. Hit the “Enter” key

TIP:Ā Never whitelist free email domains such gmail.com, yahoo.com, msn.com, etc. You can whitelist individual senders, butĀ most (if not all) free email services are used to send high-volume spam, so whitelisting the entire domain is a bad idea 🙅‍♂️

 

Add Pattern Support for HTML5 Input Type Number with jQuery

Ran into an issue earlier today that I could not figure out and ended up askingĀ my second question on StackOverflow in seven years.

I was trying to use <input type="number" pattern="[0-9]{8}">Ā to enforce 8-digit numbers while allowing leading zeros. This was being done on an optional field (no requiredĀ attribute) and I could not understand why it was bypassing my pattern on the populated field (eg: value “1234” was accepted, pattern ignored).

Peter B. over at SOĀ (kudos) pointed me to the MDN reference that provided the reason…Ā number input does not support pattern attribute

By design! While their reasoning makes sense from a general perspective, the min/max attribute workaround does not help where leading zeros are acceptable (eg: min="00000001"is the same as min="1"Ā for obvious reasons). Unfortunately I need all 8-digits for my purposes. I also tried using minlength and maxlengthĀ attributes as a hail-mary to no avail.

Here is a jQuery shim I wrote for my main script file thereby adding pattern support theĀ <input type="number"> Continue reading

How to Continue Using Buttons with “data-loading-text” in Bootstrap 4 with jQuery

While converting a Bootstrap 3 template design for use with Bootstrap 4, I noticed they removed stateful buttons (eg: “loading” and “reset” button states) from BS4! Granted it was mentioned in BS3, but I never noticed theĀ deprecated warning šŸ™

The deprecated code for showing a button’s loading state wasĀ $('#selector').button('loading') andĀ to return the button to its original state you would useĀ Ā $('#selector').button('reset')Ā . Continue reading