Converting Text Files to HTML Using SharePoint Designer

This is a tutorial illustrating the best way to convert text files into HTML on a new blank web page or within a template using SharePoint Designer. This method strips out unnecessary and sometimes harmful formatting from the source documents and makes for much cleaner HTML and smaller file sizes.

Please Note: The tutorial illustrates this method with screen shots depicting the conversion of a Word document but, the same principal can be applied to text copied from a variety of electronic sources, such as browsers, e-mail, PDFs, etc. (After copying text form any of these sources, follow instructions beginning with step 4 below.)

Instructions and Screenshots
Step 1 - Open the Word document

a. Open MS Word.

b. Click on the folder icon to open a file:

open button

c. Browse to the file you want to convert, click on it once to select it, then select "Open":

oepn file
Step 2 - Select all text

Select "Edit" on the menu bar, then choose, "Select All". (Or select "Ctrl + A" on your keyboard)

select all
 
Step 3 - Copy the selected text

Now that the content has been selected, Copy it* by clicking on the "Copy" icon on the Standard toolbar. (Or selecting, "Ctrl + C")

*NOTE: Text must be selected in order for the copy to be made.

selection
Step 4 - Open SharePoint Designer, open your site and open a page

a. Open SharePoint Designer, then open your site. [if necessary, see "Opening your site..." tutorial]

b. Open a new web page by clicking on the new page icon.

NOTE: When inserting a Word file into a template, open the template, place your cursor where you want the Word file to appear, proceed to step 5b.

Step 5 - Paste the copied text

a. Place you cursor in the document where you want the Word file to appear..

b. Select: "Edit /  Paste Text..."

Step 6 - Select the proper formatting

When the "Paste Text" window opens, do the following:

a. Click on the "Normal paragraphs without line breaks" text to select it.

b. Make sue that, "Preserve Hyperlinks" is selected.

c. Click on "OK".

  

Step 7 - Reformat the text

You may want to reformat the text at this point, as during the "Paste Text" procedure, all text was given the default text size and weight.

To apply headline formatting:

a. Place your cursor anywhere within the line of text you want to format or click on the little tab that appears when you place your cursor in the text block to select the entire block. (you do not need to click and drag to select a block element, such as a paragraph or heading).

b. Using the drop-down menu in the menu bar, select the Heading size you prefer - "Heading 1" being the largest.

c. Select one of the headings from the drop-down menu

NOTE: If the source document was not properly formatted using paragraph breaks, the converted text will not have them either --the text will be converted as one big paragraph with line breaks <br /> in between what should be the separate paragraphs. If this is the case, be sure to replace the line breaks with paragraph breaks <p> by backspacing-out the line breaks and hitting a hard return in their place.

Step 8 - Save the file

Select, "File/Save As..."

 

Step 9

When the "Save As" dialog box appears,

a. Make sure "Current Site" is selected from the left-hand column

b. Either remain at the root level of your site or click on and open a folder where you want the file to be saved

c.  Type the file name in the "File Name" window

d. Select the "Change title.." button to change the page title

e. Select "Save"

  

Return to SharePoint Designer Tutorials Page »

Go to top of page