Matt Refghi's Blog Technology and other written works

14Aug/090

Converting Formatted Text from the Clipboard to Plain Text

Usually when I copy text from web pages, I really don't want the formatting from the webpage to be kept. I  just want to have the text in the simplest format possible, and then I can set my own styles. Unfortunately, this isn't normally how it works. Typically, when copying from a web page in a browser, it may also copy any tables, images, and styles that are applied to or mixed with the text. This does depend on where you are pasting the text, though. In my case, I use Microsoft Word most of the time. Word supports a lot of web page elements, meaning they will likely appear in the Word document.

Consider the following text:

This is some example text. You'll notice that numerous styles are appliedwarning

Here are some bullet points:

  • One
  • Two
  • Three
    • Three Part 1
    • Three Part 2
  • Four

If I wanted to copy that text to Microsoft Word, here is what I'd see:

pastedtoword

Word is pretty good at keeping the formatting mostly intact; however, sometimes, this isn't desired.

The formatting is mostly intact. What if you didn't want that? What if you just wanted plain text, and you wanted to choose your own styles from scratch? There is one way to do it from within Word (click the wordbutton1 button for these options), but I'll show you how to do it without such a  feature. To achieve this, I paste the text into Notepad. Yes, Notepad - the simple text editor provided by Windows. Here's what the text will look like, once pasted:

Notepad will remove formatting from any text you paste into it.

Notice how the image is gone, and all the styles are removed? Now you can copy this text instead, and paste it in Word:

pastedtowordplaintext

No more formatting!

No more styles, bullets, or image. You can now style it exactly as you want, without having to start off with the same formatting as the web page. This isn't, perfect, though - you may have to make corrections to the plain text copy in Notepad, as the removal of the formatting sometimes leaves the text with improper indentation.

I've used this little trick in a few different scenarios. Here's an example: Sometimes I include a quote from a website in my e-mails. The default format for my e-mails is rich text, but when I include something from another source, I really don't care about formatting - I'll set my own formatting to suit my e-mail. If I just copy paste the quote into my e-mail, it will include the formatting - this usually ruins the look of my e-mail. To prevent this, what I do first is use Notepad to destroy the formatting, and then paste the plain-text version into my e-mail.

8Aug/090

Enabling Theme Support in Windows Server 2003

Microsoft's Server operating systems are specifically aligned to offer, above all, top reliability and performance. It is therefore no surprise that Windows Server 2003, at first glance, seems to lack the standard Luna desktop theme that XP users have been accustomed to. Here's the thing: The feature isn't missing, it's just "hidden" by default.

Solution

Here's how to enable it:

1) Open the Services Management Console by entering "services.msc" in the Run dialog.

To open the Run dialog, click Start > Run, or press Windows Key + R.

2) Locate the Themes service, right-click it, and select Properties.Screenshot of the "Services" dialog, with the "Themes" service selected.

3) On the General tab, select the Startup Type dropdown, and choose Automatic.

4) Click Apply.

5) Click OK.

6) Right-click the Themes service again, and select Start.

7) Close the Service Management Console.

8) Right-click on the desktop, and select Properties.

9) On the Themes tab, select the Theme dropdown, and choose Windows XP.

10) Click Apply.

11) Click OK.

The Windows XP option, by default, is not listed as an available theme in the Display Properties dialog. When we started the Themes service, the option was added... and there you have it. You can now use the XP theme (Luna), in a Windows Server 2003 environment.

A screenshot of the "Themes" tab of the "Display Settings" dialog, with the "Windows XP" theme selected.

The default XP theme, codenamed Luna, will appear in the "Display Settings" dialog as the "Windows XP" theme.