Ever paste a beautifully crafted snippet into Word or Outlook, only to watch your formatting fall apart like a sad Jenga tower? We’ve got just the fix: a clever workaround using HTML and JavaScript that keeps your snippets looking crisp, clean, and exactly how you want them.
Whether you’re formatting an email signature, a branded response, or a super-styled list, this method ensures what you see is what you paste. Let’s do it!
Step-by-Step: The Formatting Preservation Workflow
Or save a Word document as HTML (filtered) to extract the code
Paste Your HTML Into a Snippet
Open one of the HTML snippets you duplicated
Replace the placeholder content with your own HTML
Give it a new abbreviation to trigger it easily
Update the JavaScript Snippet
Switch over to the jv.expandme snippet
Change the nested snippet abbreviation inside the script to match the new HTML snippet you just created
Give this JavaScript snippet a new abbreviation, too
Test It Out!Expand the new abbreviation and marvel at your perfectly preserved formatting — no unexpected changes, no hassle, just clean results every time!
Want to See It in Action?
We walk through the whole process in this quick video tutorial:
This is one of those “once you try it, you’ll never go back” kinds of tricks. If you send a lot of polished, pre-formatted content, this will be your new favorite workflow.
I don’t know if I could love this any more than I do.
Literally just saved my brain when it comes to trying to get a heavily formatted template into Outlook emails.
If you want to add that note basically you have to have the email formatted in the way you want, and then switch the format text from rich text to HTML and then it will allow you to save it as an HTML file.
Then you can do the trick, but it also has all the nice things that come with having formatting the email in Outlook rather than the fun “bits” that are left over from Word when you paste it into an Outlook email.
Okay, after having used this for a bit my one complaint is that it really skews the reporting. Basically it acts like I’m inputting the HTML myself manually rather than copying and pasting just the text and I’ve got some skewed data.
Basically I have someone in the past month save 60 hours with 72 snippets because a lot of them were the large formatted HTML file that I’m using. We saved a lot of time with those, but that feels like it’s a little too much on the report side.
Hey @JonathanLavallee . This is likey do to the fact that our statistics don’t accurately track nested snippets currently. If you put your HTML content in with the JavaScript snippet, rather than having it as two snippets with one nested, it should more accurately reflect in statistics. I made the example with a nested snippet to make it easier to paste in the HTML. But you can totally just paste it where the nested snippet is instead.
Please let me know if that helps. I’m happy to answer any questions you might have!
Ooooh, I follow. So statistics are reported based on the length of the text expanded by the WPM you enter in the form before generating the report. Unfortunately, I don’t think there is anything we can do to impact this based on how statistics are calculated. However, I can totally share this feedback with the team.
(I also like having the HTML nested, it just feels cleaner)
This is your space to ask questions, find support, and share ideas with fellow TextExpander users and our product team. As a first step, take a moment to introduce yourself to the community.