View Single Post
  #2  
Old February 10th 09, 08:04 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default HTML code changing in Outlook

Both Outlook and WordMail editors will re-write your HTML, there's nothing
you can do about that. You must have the HTML fully and correctly formatted
to have a prayer of preserving what you want. Aside from Outlook not liking
to run HTML that runs scripts, you will need to use a fully qualified
protocol reference such as "FILE://", you can't use shorthand HTML and
expect it to remotely resemble what you want.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"GwenP" wrote in message
...
Would anyone be able to shed some light on why - if I attach an HTML file
into my email as text then send it an view the source - the code has
changed
and therefore my hyperlinks no longer work?

This is the original code in the htm file:

!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
HTMLHEAD
META http-equiv=Content-Type content="text/html; charset=iso-8859-1"
META content="MSHTML 6.00.6000.16705" name=GENERATOR/HEAD
BODY

SCRIPT type=text/vbscript

Function OpenDoc(DocPath)

DIM oWSH

Set oWSH= CreateObject("WScript.Shell")

oWSH.Run "view32.exe " & DocPath, 1, True

set oWSH = nothing
End Function

/SCRIPT

A href="#"
onclick="OpenDoc('\\ourfiles\docs_dir\ws_ourlegal\ ourname\2610\1\7832966.1')"Tip
07 - Using the Elite Auto Matters workspace/ABR
FONT face=Arial color=#ff0000
size=4STRONGGwen/STRONG/FONT/BODY/HTML

and this is the view source code from Outlook:

!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
HTMLHEAD
META http-equiv=Content-Type content="text/html; charset=us-ascii"
META content="MSHTML 6.00.6000.16705" name=GENERATOR/HEAD
BODY
DIV
SCRIPT type=text/vbscript

Function OpenDoc(DocPath)

DIM oWSH

Set oWSH= CreateObject("WScript.Shell")

oWSH.Run "view32.exe " & DocPath, 1, True

set oWSH = nothing
End Function

/SCRIPT

A onclick="OpenDoc('\\lofile\ws_docs\ws_legal\colinc \2610\1\7832966.1')"
href="outbind://47/#"Tip 07 - Using the Elite Auto Matters
workspace/A
DIV align=leftFONT face=Arial color=#ff0000
size=4STRONGGwen/STRONG/FONT/DIV
DIV /DIV/BODY/HTML

Thanks
GwenP


Ads