Handy HTML paste trick for anyone wanting to upload Word or OneNote documents

 

Home (for Blackwatte students working on their projects)

 

For detailed OneNote or Word docs which have:

·         bullets

o    at multiple levels

1.      And numbering

a.       With 2 or more levels

b.      Colours such as Green

c. And fonts such as Courier which may be used for code blocks

 

Note: The OneNote links below will only work for Blackwattle students who have the relevant Microsoft permission.

 

Note that the resulting web pages are messy under the bonnet, but reasonably easy to edit and manipulate in an editor. (the css script is attached to each line)

 

You'll need Visual Studion as Dreamweaver does not preserve  indents and much of the format, probably because it's not a Microsoft product.

 

I'm going to copy this Pascal Setup Notes short page as an example.

 

On OneNote, select all on the page (CTRL+A+A) and paste into a blank Word document.

Machine generated alternative text:
Documen... NevGoodyer 
Inser Draw Desig Layol Refer Maili Revie View Math Help Acrol 
File Hom Pens 
Paste 
Clipboard 
113 words 
Font 
Paragraph 
Styles 
18 
Editing 
22 
LEI 
Ado be 
Acrobat • 
10 
12 
14 
20 
24 
26 
28 
Dictate 
Voice 
30 32 
34 
English (Australia)

 

In visual studio, right click on the solution FOLDER to create a new HTML page:

Machine generated alternative text:
Solution Explorer 
004 
Search Solution Explorer (Ctrl+;) 
Solution 'Lotto' (I of I project) 
Add New Item... 
Existing Item... 
New Folder 
Add ASP.NET Folder 
From Cookiecutter... 
REST API Client... 
Client-Side Library... 
New Azure WebJob Project 
Existing Project as Azure WebJob 
Reference... 
Service Reference... 
Connected Service 
Web Form 
Web User Control 
JavaScript File 
Style Sheet 
HTML Page 
Ctrl+Shift+ 
Shift+AIt+ 
Build Web Site 
Publish Web App 
Scope to This 
New Solution Explorer View 
View Class Diagram 
Client-Side Library... 
Manage NuGet Packages... 
Manage Client-Side Libraries... 
Start Options... 
Set as StartUp Project 
View in Browser (Google Chrome) 
Browse With... 
Refresh Folder 
Source Control 
Cut 
Copy 
Remove 
Open Folder in File Explorer 
Save As Solution Filter 
Hide Unloaded Projects 
Load Project Dependencies 
Properties Window 
Property Pages 
Run Code Analysis on Web Site 
Ctrl* 
Ctrl+Shift+ 
Ctrl+X 
Ctrl* C 
Ctrl+V 
Shift 
w 
ml-JS 
ml- Pascal 
ml-Py 
• ml-VB 
Plano I 
.gitattributes 
.gitignore 
_ config.yml 
index .html 
Lotto.sln 
lottoOI .html 
ml-JS.htmI 
ml- Pascal.html 
ml-Py.html 
ml-V8.htmI 
planOI .html 
plan02.htmI 
plan03.htmI 
planu.html 
README.md 
Web.config 
zzindex.html 
on Explorer 
Ries 
Team Explorer

 

 

Create a folder with the same name as the page name:

Machine generated alternative text:
Solution Explorer 
Search Solution Explorer (Cl 
Solution 'Lotto' (I of I prc A 
20 -Lotto 
. vs 
buildOI pas 
html Paste 
ml-JS 
ml- Pascal 
ml-Py 
• ml-VB 
Plano I 
.gitattributes 
.gitignore 
_ config.yml 
buildOIpas.htmI 
htmlPasteTrick.htn• 
index .html 
Lotto.sln

 

 

Name it and view it in split view (Split HTML Page in Visual Studio):

Machine generated alternative text:
File Edit 
Extensions 
plan03.htmI 
G Design 
Yiew project 
Window Help 
Build 
Debug 
Debug 
Test Analyze 
Any CPU 
Tools 
Search... 
Lotto 
buildOI pas.html* 
< !DOCTYPE html> 
<meta 
/ title> 
< / body> 
< / html> 
x 
planæ.html 
plan02.htmI* 
Live Share 
Solution Explorer 
Search Solution Explorer (Cl 
Solution 'Lotto' (I of I prc A 
, e 20-Lotto 
buildOI pas 
htmlPasteTrick 
ml-JS 
ml- Pascal 
ml-Py 
• ml-VB 
Plano I 
.gitattributes 
.gitignore 
_ config.yml 
buildOI pas.html 
htmlPasteTrick.htn• 
index .html 
Lotto.sln 
Inttnnl html 
Solution Explor... 
Team Explorer 
Properties 
buildOIpas.htmI Web File • 
File Name 
buildOI pas.htr 
@ Split 
col 1 
Source 
20-JS-Lotto 
master

 

 

 

In Word, select all (CTRL+A) and paste it into the "Design" side of the page above:

Machine generated alternative text:
File 
Tools 
Edit Yiew project 
Extensions Window 
Build 
Help 
Debug 
Debug 
Format Table 
Any CPU 
Test 
Ana 
(New Inline Stylf • 
Lotto 
plan03.htmI 
346 
347 
351 
352 
353 
354 
355 
356 
357 
358 
359 
361 
G Design 
buildOI pas.html* 
24/eg/2e18 g:2e pm 
planæ.html 
x 
plan02.htmI* 
Type 
Application 
O File 
Pascal source 
SSS File 
CFE File 
DSK File 
Configuration 
ERR File 
file 
sett... 
OLIT File " height 
font -family : uot; Time s m New 
: EN- ALI" > 
< / body> 
< / html> 
99 * 
If you don't have Pascal loaded the 
setup is here: Pascal 
As a test: download this folder and run 
the " _pas" file: 
https- 
Add3Nunn VOI 
In the IDE: compüe with check the 
syntax: execute ihi_ll create an 
PX Pascal XE 
Common tasks 
20 -Pas-Lotto-VOI pas X 
program Lotto ( 
input 
outpu 
{used as a demo of pseudo, 
; {a Library necessa 
Uses crt 
Const {for GLOBAL constants 
art-Size 
6; {a GLobaL va 
Tvoe {both the user arrav 
Live Share 
Solution Explorer 
CO 
Search Solution Explorer (Cl 
Solution 'Lotto' (I of I prc A 
, e 20-Lotto 
buildOI pas 
htmlPasteTrick 
ml-JS 
ml- Pascal 
ml-Py 
• ml-VB 
Plano I 
.gitattributes 
.gitignore 
_ config.yml 
buildOI pas.html 
htmlPasteTrick.htn• 
index .html 
Lotto.sln 
Inttnnl html 
Solution Explor... 
Team Explorer 
Properties 
DOCUMENT 
@ Split 
col 1 
Source 
20-JS-Lotto 
master

 

Click on an image and look in the code window to see where it has been stored - probably in the depths of the c-drive! Copy the address and view the images in File Explorer. Select them all (CTRL+A) and CUT (CTRL+X).

Machine generated alternative text:
Windows 
Intel 
Pascal 
PerfLogs 
Program Files 
Program Files (x86 
SOD 
Sy mCache 
Transfer 
clip_colorscheme 
mapping 
IY,C'I 
clip_imageDOI 
clip_themedata 
clip_imageD02 
Search 01 
clip_imageDD3 
clip_imageDCu4 
Users

 

Machine generated alternative text:
nevgo AppData 
Local Temp 
msohtmlclipl 
Windows 
Intel 
Pascal 
PerfLogs 
Program Files 
Program Files (x86 
SOD 
Sy mCache 
Transfer 
Default.migrated 
clip_imageD02 
Search 01 
clip_imageDD3 
clip_colorscheme 
mapping 
clip_imageD04 
clip_imageDOI 
clip_themedata

 

Go to the website file view and paste into the folder you created:

Machine generated alternative text:
< GitRepos 
Del A 
Al Ca: 
A2 Poi 
A3 Stu 
: lasswor 
20-JS-Lotto buildOI pas 
Name 
clip_colorschememapping 
clip_imageDOI 
clip_imageD02 
clip_imageDD3 
clip_imageD04 
clip_themedata 
Date modified 
11/10/2019 11:42 AM 
11/10/2019 11:42 AM 
11/10/2019 11:42 AM 
11/10/2019 11:42 AM 
11/10/2019 11:42 AM 
11/10/2019 11:42 AM 
Type 
XML Document 
PNG File 
PNG File 
PNG File 
PNG File 
Microsoft Office 
Search bu.. 
Size 
95 KB 
20 
20 
23 KB

 

Now of course, all the links are broken on the web page. We can solve this with a "Find and Replace" (CTRL+H):

In this case "images/htmlPasteTrick" needs to be replaced with "build01pas":

If you are using an images folder, replace with "images/build01pas"

Machine generated alternative text:
IC'3.htmI 
138 
139 
141 
142 
143 
145 
146 
147 
148 
149 
buildOIpas.htmI* 
x 
planC4.htmI 
plann.html' 
planC'I .html' 
Local/Temp/msohtmIcIipI /OI X • 
buildOI pas 
Aa Current Document 
cli 
ima eøel. 
5b cab 
y: shape 
•Times 
New 
Roman&quot;

 

In this case, there are 8 replacements:

Machine generated alternative text:
Microsoft Visual Studio 
8 occurrence(s) replaced. 
Z] Always show this message

 

Open your file and check the format - although the code is a dog's breakfast, indents and colours should be preserved:

 

Now, Dreamweaver is also very handy. In my case, I have 7 image folders, which I would like to put inside 1 "images" folder. In Dreamweaver, if you move a folder or page, you are given the option to automatically update all the links. You must have the site setup and this is the view. Drag the build folder into the image folder:

Machine generated alternative text:
Filg CC 
± 20-js-Lotto 
Local Files 
CSS 
Define Servers 
L 
Site - 20-JS-Lotto on DW 
build O Ipas 
htmlPasteTrick 
mages

 

As you release from the drag, you see this dialog. Choose "Update":

Machine generated alternative text:
Update Files 
Update links in the following files? 
'images/buildolpas/clip_colorschememapping... 
"build01pas.htmI 
update 
Pont Update 
Help

 

After moving 7 folders, the directory is tidier and still functional:

Machine generated alternative text:
Site - 20-JS-LOttO on D w (C : Users 
mages 
ml-Pascal 
.gitattributes

 

The tidy version is:

Machine generated alternative text:
Filø CC CSS 
a 20-js.Lotto v 
Define Serv 
Local Files t 
Site - 20 -'S -Lotto on DW (C : Vsers\nevg 
. vs 
mages 
.otattributes 
. gibgnore 
_confiq. 
buidO leas. html 
htmlP asteTrick. html 
Lotto. 
lottoO 
ml-JS.htmI 
rd-pasd. 
ml_py .htrnl 
plano I, h 
plan02.hbW 
plan03.hbnI 
README.md 
W config

 

And back in VS, after a "refresh", the folders looks like:

Machine generated alternative text:
Solution Explorer 
Search Solution Expl orer (Ctrl +1,) 
Solution 'Lotto' (I of I project) 
20 -Lotto 
mages 
.gitattributes 
.gitignore 
_ config.yml 
buildOI pas.html 
htmlPasteTrick.htmI 
index .html 
Lotto.sln 
lottoOI .html 
ml-JS.htmI 
ml- Pascal.html 
ml-Py.html 
ml-V8.htmI 
planOI .html 
plan02.htmI 
plan03.htmI 
planu.html 
README.md 
Web.config 
zzindex.html

 

Remember to give your page a "Title"! Add it in on line 5 of the code, between the Title tags.

 

Hope it works for you! If you have several pages to do, you get VERY fast at this!

Hope it works for you?